javascript - Angular 1.5.x - Directive not firing -


i'm practicing working directives, , have been banging head on while now.

the code -

module

angular.module('wbheader', []); 

controller

angular.module('wbheader').controller('wbheadercontroller', ['$scope', function() {  }]); 

directive

angular.module('wbheader').directive('wbheader', function() {   return {     transclude: true,     restrict: 'aec',     scope: {      },     controller: 'wbheadercontroller',     templateurl: '/modules/wb-header/header.html'   }; }); 

plunker -

https://plnkr.co/edit/ourcm1mgb5k0wn8u2ke9?p=preview

i feel i'm overlooking simply, not sure!

yes simple,in code ng-app should renamed as

change

from

<html ng-app="wbapp"> 

to

<html ng-app="wbheader"> 

demo


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -