What is the alternative of ng-init=\"myText=\'Hello World!\'\" in Angular 2 to add in the template, not in the component
ng-init=\"myText=\'Hello World!\'\"
Little Update! In the latest versions of Angular this will not work:
@Directive({ selector: 'ngInit', exportAs: 'ngInit' })
you should use '[]':
@Directive({ selector: '[ngInit]', exportAs: 'ngInit' })