I\'m creating a directive with template URL. I want to set the template URL dynamically based on user_role. Any idea?
Heres my directive code:
RatingRX.d
You can pass a function to the templateUrl option and return a string that will be used as a template url at the end.
First of all assign a role onto the element as an attribute (where userRole is bound to scope) as:
Update: This used to work before with older version of Angular. 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
Update: This used to work before with older version of Angular.