I am trying to learn angular2 (and Typescript) and, following a quick start guide and a few informal tutorials, I made progress to have a simple application with some components.
I understand the process of binding model data to a DOM element using the notation enclosed in square brackets in my templates: <h1>{{title}}</h1>
What I'm trying to understand is how I could dynamically create a new component from my Typscript code and then display it in the DOM.
If I import the component into my file and create a new instance, this will call the component constructor in the model. Can angular2 provide this or add a component to another component or the requested div element?
import {ListComponent} from './list.component'; ... export class MainAppComponent { buttonClicked(){
angular
originUnknown
source share