Wanted to get the input value, but looking at the console.log it show that this value is undefined. Anyone here who know how to solve that.
import Route from ‘@ember/routing/route’;
export default Route.extend({ actions: { addProduct: function() { var product = this.get(‘product’); console.log(product); } } });
Product
{{input type="text" class="form-control" value=product placeholder="Product Name"}}
<div class="form">
<label>Price</label>
{{input type="text" class="form-control" value="price" placeholder="Price"}}
</div>
<div class="form">
<label>Amount</label>
{{input type="text" class="form-control" value="amount" placeholder="Add Task"}}
</div>
<button {{action 'addProduct'}} class="add-button">Submit</button>