Reputation: 211
assume I have my directives in
@directivesModule = angular.module('myApp.directives', [])
and in directive.coffee
directivesModule.directive 'showAuthorLogin', () ->
restrict: 'E'
template: '<div>Hello World</div>'
index.html:
<span showAuthorLogin></span>
why isn't anything showing?
Upvotes: 0
Views: 88
Reputation: 18513
restrict: 'E'
means that the directive has to be an element. So you could change the directive to restrict: 'A'
or you could change your html to: <showAuthorLogin></showAuthorLogin>
Here is an example of it working on JSFiddle: http://jsfiddle.net/X6A7M/
Upvotes: 1