I'm still new with angularJs I'm trying to pass a value of a variable from a page html to another page(actually a modal).Both of the pages share the same controller . Would help me to diagnose the pb please
Html Page1:
<button type="submit" class="btn btn-primary pull-right"
data-ng-click="ctrl.nextOperation(chosenProducts,'lg')">Next</button>
</div>
app.js :
self.nextOperation = function(chosenProducts,size)
{
$scope.chosenProducts= chosenProducts;
$scope.product = chosenProducts[0];
console.log($scope.product.nameProduct);
console.log("test test nextt Operation "+chosenProducts[0].nameProduct);
var modalInstance = $uibModal.open({
animation : $scope.animationsEnabled,
templateUrl : 'partials/operation.html',
controller : 'ProductsController',
scope : $scope,
size : size,
resolve : {
}
});
};
Page 2 :
<table>
<tbody>
<tr class="cake-bottom" >
<td class="cakes">
<div class="product-img2">
</div>
</td>
<td class="cake-text">
<div class="product-text">
<h3>{{product.nameProduct}}</h3>
<p>Product Code: {{product.numSerie}}</p>
</div>
</td>
<td class="quantity">
<div class="product-right">
<input min="1" type="number" id="quantity" name="quantity" value="" class="form-control input-small">
</div>
</td>
<td>
<h4>{{product.price}}</h4>
</td>
<td class="btm-remove">
<div class="close-btm">
<h5>Remove</h5>
</div>
</td>
</tr>
</tbody>
</table>