Closed dgtlmonk closed 8 years ago
@dgtlmonk Yes it is. $onInit is declared on the class itself, as shown below:
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js"></script>
<script src="https://npmcdn.com/angular2-now@1.1.6/dist/angular2-now.js"></script>
</head>
<body>
<app></app>
</body>
</html>
var {Component, bootstrap, SetModule, options} = angular2now;
options({controllerAs: 'vm'})
SetModule('app', []);
@Component({
selector: 'app',
template: `<h2>Hello World</h2>`
})
class App {
$onInit () {
console.log('component loaded')
}
constructor() {
console.log('@App')
}
}
bootstrap(App);
Hi and thanks for this awesome library :)
I was wondering if Angular 1.5 syntax
$onInit
is supported? What version of angular is this library currently using?Kind regards.