Basically I\'m looking for a way to implement a counterpart to Angular 1.x ngInit directive.
ngInit
I\'m aware of ngOnInit hook and the fact that
ngOnInit
This can be achieved with a directive:
@Directive({ selector: '[initialize]' }) class InitializeDirective { @Output() initialize = new BehaviorSubject(); }
The expected use is:
{{ foo }} {{ bar }}