0

I have json object from which I want to get data in connectionPoints which is array. It looks like this:

assetType : "this"

connectionPoints:Array(1)

type:{name: "Structure", 

In TS file is something like this (entity is all this json object):

@Input() set elements(elements){

        this._elements = elements;

        if( elements && elements.length > 0){

            this.entity = elements[0];
        }else {

            this.entity = {};
        }
    }

And html:

<input type="text" value={{here i want to show connection.type}}/>

I want to acess data in connectionPoints array...position, system, type ... so that I can show that in html input.

1 Answer 1

1

Use ngModel as follows

<input type="text" [(ngModel)]="entity.connectionPoints[0].type"/>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.