I want to write a directive to put as HTML tag instead of these tags:

                <div class="col col-20">
                    <a class="home-btn color-b">
                        <i></i>
                        <span>{{"D_VCI" | translate}}</span>
                    </a>
                </div>

here is my directive:
.directive("baseIcon", function () {
 return  {


 link : function (scope, element, attrs) {
 var PropertyColor = attrs["colorProperty"];
 var PropertyText = attrs["textProperty"];
 var PropertyRef = attrs["refProperty"];
 },


 restrict : "A",
 templateUrl : "directives/templates/baseIcon.html"


 }
})

and about templateUrl:

<div class="col col-20">
        <a class="home-btn PropertyColor" ui-sref="PropertyRef">
        <i></i>
        <span>PropertyText</span>
    </a>
</div>

I know that this approach will not work. Please give a guide to correct it. 

<div base-icon color-property="color-a" ref-property="app.factories" 
text-property="{{"D_VCI" | translate}}"></d

Thank you for your help and support.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to