AngularJS directive not displaying the template
- by iJay
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