Hi , Please any one help me
my first view is a list how display many product , when i click my choice my second view show me the details of this product, but i can’t pass the id of the product from the first view to the second in order to display the detail from the database.
there is my code :
First Page
Acceuil.html:
Second Page:
Livre.html:
My Controller :
(function(){
app=angular.module(‘starter’, [‘ionic’,‘youtube-embed’,‘ngCordova’])
app.config(function($stateProvider,$urlRouterProvider)
{
$stateProvider.state(“acceuil”,{
url:"/acceuil",
templateUrl:“templates/acceuil.html”,
controller:“acceuilCtrl”
});
$stateProvider.state(“Livre”,{
url:"/:name",
templateUrl:“templates/Livre.html”,
controller:“LivreCtrl”
});
app.controller(‘acceuilCtrl’, function($scope, $http) {
$http.get(“http://localhost/query.php”)
.success(function (response) {$scope.names = response.records;});
});
app.controller(‘LivreCtrl’, function($scope, $http) {
$http.get(“http://localhost/query.php”)
.success(function (response) {$scope.names = response.records;});
// $scope.item={name:“Coran”,price:“12:00”};
});
}());
.