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.directive "headermenu", ->
directive = {}
directive.restrict = 'E'
directive.templateUrl = "../assets/common/headerMenu{{user_role}}.html"
directive
And I want to set user_role from the controller. Eg:
$scope.user_role = 1
user_rolecome from?