AngularJS directive not displaying the template
Posted
by
iJay
on Stack Overflow
See other posts from Stack Overflow
or by iJay
Published on 2014-06-06T09:23:08Z
Indexed on
2014/06/06
9:24 UTC
Read the original article
Hit count: 360
Here is my AngularJs directive. Its' expected to show the div in the template but it shown nothing while the code is run.
Here is the html
<div ng-app="SuperHero">
<SuperMan></SuperMan>
</div>
Here is the AngularJS directive
var app = angular.module('SuperHero',[]);
app.directive('SuperMan',function(){
return{
restrict:'E',
template: '<div>Hello fromt Directive</div>'
}
});
And here is the demo
© Stack Overflow or respective owner