In the Ionic 1.2 code I'm working with, my template.html looks like this:
<form ng-submit="addToCart(products)">
<div ng-repeat="product in databaseProducts.products.details">
<input ng-model="products.value" type="number">
</div>
<button type="submit">add to cart</button>
</form>
However, when I attempt to console.log(products) within my addToCart() function in the corresponding controller, all I get is "undefined". The issue lies in ensuring that the value of the product input corresponds to its id for tracking purposes. I even attempted to use dynamic model names without success in this simple example.
Any idea what could be causing this problem and have any suggestions for a workaround?