Hi all,
In all Angular2 examples I've seen, components instances are created from
the HTML part (i.e. <todo-cmp> ).
1) It is possible to create a component instance from the code and put it
in the UI DOM?
2) There is a way to do something like this:
1. @Component({
2. selector: 'parent-cmp',
3. template: `
4. <{{child-directive}}/>
5. `,
6. })
7. class ParentCmp {
8.
9. child-directive: string;
10.
11. constructor(){
12. child-directive = "todo-cmp";
13. }
14.
15.
16. }
Massimiliano
--
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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.