Suport for component type
Closed this issue · 0 comments
marcioj commented
Angular 1.5 supports a new type called component
which is just a layer on top of directive
.
Like directive, component has a property called controller which we need to annotate. Ex:
angular.module('app', [])
.component('greeter', {
bindings: {
message: '='
},
controller: function (GreeterService) {
this.message = GreeterService.getMessage();
},
template: '<h1>{{$ctrl.message}}</h1>'
});