0

I am using fuse theme and I am a newbie to angular.Here is the code confusing me for a while now.

<a  ui-sref="app.register" translate="LOGIN.CREATE_ACCOUNT">Create an account</a>

I tried to look for translate in angular documentation and git hub could not figure out what this is meant for.

  • 2
    If you look for "angular" and "translate" together in the same search, you can find [this stack overflow answer](http://stackoverflow.com/a/23866441/1558430) – Brian Apr 22 '17 at 06:37
  • But that question is using translate as a filter but I think here in the above code it is being used as a directive.More over it is not that elaborated example for me to understand.Hope you can help. @Brian –  Apr 22 '17 at 06:39
  • 1
    Translate is the service actually, but in templates you can access it via directives and filters, but from javascript you can only use the service or the filter instance. Your code means that the ngTranslate module will look for a key `LOGIN.CREATE_ACCOUNT` on your translations and replace the element contents with the value provided for that translation. If nothing has found I guess it'll keep the original content. – lenilsondc Apr 22 '17 at 06:50

0 Answers0