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">
Comments
Post a Comment