I am trying to use Angular 1.5.0-beta.0 , which I installed from npm .
According to some tutorials - now we can create a component using module.component instead of the old module.directive method.
This is the component code:
export default angular.module('app.components.header', []) .component('dashboardHeader', { controller: 'HeaderCtrl as headerCtrl', template: `This is test.` }) ;
My html:
<body> <dashboard-header></dashboard-header> <div ui-view="content"> </body>
I get:
angular.module(...).component is not a function
What could be the problem?
source share