0

I am new to angular and I want to bind the value of property bonded in for loop to an input value

for example : I want to bind name to next component input value : <input name="Name" readonly [(ngModel)]="item.name" class="form-control" id="txtName">

<other-component [userName] = "?????" ></other-component>

1
  • Provide more details or share a demo link. Commented Mar 31, 2020 at 9:35

1 Answer 1

2
<other-component [userName] = "itme.name" ></other-component>

if you're using in for loop

other-component.ts must have

@Input() userName:any;
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.