These should be the simplest possible embedded components, but when I load this (via systemjs), all I see in the browser is “Counters”, and it’s <counter></counter>
added to the DOM. There is no indication of "Hello Counter" or any component processing counter
.
import angular from 'angular2/angular2';
var AppComponent = angular
.Component({
selector: 'my-app',
template: '<h1>Counters</h1><counter></counter>'
})
.Class({
constructor: function () { }
});
angular
.Component({
selector: 'counter',
template: '<h2>Hello counter</h2>'
})
.Class({
constructor: function () {}
});
angular.bootstrap(AppComponent);
source
share