Probleme d'un div cliquable
Fermé
kina90
Messages postés
163
Date d'inscription
samedi 22 novembre 2008
Statut
Membre
Dernière intervention
15 mars 2021
-
2 nov. 2018 à 15:58
kina90 Messages postés 163 Date d'inscription samedi 22 novembre 2008 Statut Membre Dernière intervention 15 mars 2021 - 2 nov. 2018 à 15:58
kina90 Messages postés 163 Date d'inscription samedi 22 novembre 2008 Statut Membre Dernière intervention 15 mars 2021 - 2 nov. 2018 à 15:58
A voir également:
- Probleme d'un div cliquable
- Image cliquable html ✓ - Forum Internet / Réseaux sociaux
- Div c++ - Télécharger - Langages
- Div scrollable ✓ - Forum HTML
- Html image lien cliquable ✓ - Forum HTML
- Lien cliquable - Forum Windows
1 réponse
kina90
Messages postés
163
Date d'inscription
samedi 22 novembre 2008
Statut
Membre
Dernière intervention
15 mars 2021
1
2 nov. 2018 à 15:58
2 nov. 2018 à 15:58
-------------------------------------------------------------------------
mon controlleur :
var app = angular.module("school", []);
app.controller("schoolcontroller", function($scope,$http)
{
//caricamento iniziale
$http.get("Index?cmd=list")
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
$scope.school =
{
students:[],
update:function(s)
{
$http.get("Index?cmd=update&sin="+s.sin+"&name="+s.name+
"&surname="+s.surname+"&birth="+s.birth
+"§ion="+s.section+"&year="+s.year+
"&italian="+s.italian+"&italian="+s.italian+
"&math="+s.math+"&english="+s.english
+"&info="+s.info)
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
},
add:function(s)
{
//var sin = prompt('SIN. Mine is pride');
$http.get("Index?cmd=add&sin="+s.sin+"&name="+s.name+
"&surname="+s.surname+"&birth="+s.birth
+"§ion="+s.section+"&year="+s.year+
"&italian="+s.italian+"&italian="+s.italian+
"&math="+s.math+"&english="+s.english
+"&info="+s.info) .then
(
function(response)
{
$scope.school.students = response.data;
}
);
},
delete:function(s)
{
if(!s)
{
alert('Hey amico...');
return;
}
$http.get("Index?cmd=delete&sin="+s.sin)
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
}
};
});
mon controlleur :
var app = angular.module("school", []);
app.controller("schoolcontroller", function($scope,$http)
{
//caricamento iniziale
$http.get("Index?cmd=list")
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
$scope.school =
{
students:[],
update:function(s)
{
$http.get("Index?cmd=update&sin="+s.sin+"&name="+s.name+
"&surname="+s.surname+"&birth="+s.birth
+"§ion="+s.section+"&year="+s.year+
"&italian="+s.italian+"&italian="+s.italian+
"&math="+s.math+"&english="+s.english
+"&info="+s.info)
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
},
add:function(s)
{
//var sin = prompt('SIN. Mine is pride');
$http.get("Index?cmd=add&sin="+s.sin+"&name="+s.name+
"&surname="+s.surname+"&birth="+s.birth
+"§ion="+s.section+"&year="+s.year+
"&italian="+s.italian+"&italian="+s.italian+
"&math="+s.math+"&english="+s.english
+"&info="+s.info) .then
(
function(response)
{
$scope.school.students = response.data;
}
);
},
delete:function(s)
{
if(!s)
{
alert('Hey amico...');
return;
}
$http.get("Index?cmd=delete&sin="+s.sin)
.then
(
function(response)
{
$scope.school.students = response.data;
}
);
}
};
});