2

Let's say I have a component Field and have in a Main component I have an instance of Field like:

export class MainComponent {
    public field = new Field("my field value ");
    ...

How can I display that field in this component's html ?

Oleksii Kryzh
  • 231
  • 1
  • 2
  • 11
  • What is the `Field` component look like? – yurzui Sep 16 '16 at 16:12
  • @yurzui I want to make different input fields they are usually something like `` or sometimes like a `div` with some inputs and a button for uploading images. I am trying to make something like admin-on-rest but using angular2. – Oleksii Kryzh Sep 16 '16 at 16:17
  • http://stackoverflow.com/questions/36325212/angular-2-dynamic-tabs-with-user-click-chosen-components/36325468#36325468 is an example that uses it via`ViewContainerRef.createComponent()` – Günter Zöchbauer Sep 16 '16 at 16:54

0 Answers0