It is possible to override a component with a new implementation like we
can do with the services?
I want to be able to replace the template or the css of a Component.
@Component({
selector: 'foo',
template: '<span>foo</span>'
})
export class FooComponent {}
@Component({
selector: 'my-app',
template: '<foo></foo>',
directives:[FooComponent]
})
export class AppComponent {}
@Component({
selector: 'foo',
template: '<h1>foo override</h1>'
})
export class FooOverrideComponent extends FooComponent {}
//Can we inject a new implementation of component?
bootstrap(AppComponent, [(FooComponent, {useClass: FooOverrideComponent})]);
Thanks,
Stephane
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.