Hi Luis, 
Thank you so much.

It works I change it this way:

angular.module("MASCo")

.directive("baseIcon", function(){

  return {
    restrict: "EA",
    scope: {
      reffsss: "@",
      colorsss: "@",
      textsss: "@",
      bodyEn : "@"
    },
    template: [
      //"<div class='col col-20'>",
      "<a class='home-btn {{colorsss}}' ui-sref='{{reffsss}}'>",
      '<i></i>',
      "<span>{{textsss}}</span>",
      "</a>",
      //"</div>",
    ].join("")
  };
})

and in HTML :
<base-icon colorsss="color-a" reffsss="app.factories" 
textsss="'D_DIAGNOSTICS' | translate"></base-icon>

everything is good unless "'D_DIAGNOSTICS' | translate. I may use 
scope.eval. but i do not know how. 

Best Regards,
Mostafa

On Tuesday, September 1, 2015 at 1:08:27 PM UTC+4:30, Luís Loureiro wrote:
>
> Hi Mostafa!
>
> You need to tell us where's the problem! ;)
> 1 - The HTML template doesn't render inside the 'main' div?
> 2 - The data defined in the attributes don't appear?
>
>
> I think you should change some things:
> 1 - use the property *scope* when defining the directive; it eases the 
> process of passing data between *controller* and *directive*;
> 2 - in the HTML template you should reference the *scope* properties in a 
> different way, use *{{ propertyName }}*;
>
> Tell us if this helped.
>
> Regards,
> *Luís Loureiro*
>

-- 
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