I\'m trying to make directive with differtent templates based on scope value.
This is what i done so far which i don\'t know why doesn\'t work http://jsbin.com/mibey
You can also do it very straightforward like this:
appDirectives.directive('contextualMenu', function($state) { return { restrict: 'E', replace: true, templateUrl: function(){ var tpl = $state.current.name; return '/app/templates/contextual-menu/'+tpl+'.html'; } }; });