Angular 2 - Insert components dynamically into another component

0

Scenario:

@Component({
      selector: 'app-form',
      templateUrl: '<form> <!-- put a childs of component --> </form>',
      styleUrls: ['./formulario.component.css']
    })
    export class formularioComponent implements OnInit {
      constructor() { }
      ngOnInit() {}
    } 

Using it in another component and inserting other components into your tags:

<app-formulario>
   <input type="text" id="input-01" />
   <input type="text" id="input-02" />
   <input type="text" id="input-03" />
   <input type="text" id="input-04" />
</app-formulario>

Question: How do I create the above scenario?

    
asked by anonymous 01.02.2018 / 13:18

0 answers