@Murali wrote:
I have an array of strings passed as an argument to a component, inside the component I am using “each” helper to render each string in a text input. I tried the following approach.
MainComponent.hbs <Component @model={{model}}/> //Eg: model.list = ["Jack", "Sparrow"]; Component.hbs <div> {{#each this.args.model.list as |name|}} <div> <PaperInput @value={{ name }} @placeholder="Enter a Name" @onChange={{action (mut name)}}/> </div> {{/each}} </div>
I am running into the error “Uncaught (in promise) Error: Assertion Failed: You can only pass a path to mut”. Would really appreciate if anyone can let me know What’s going wrong here.
Posts: 1
Participants: 1