function stationMenu($scope){
$.ajax({
url: "/users/station_names_ajax",
type: "POST",
success: function(data){
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi",
"snippet": "The Next, Next Generation tablet."},
{"name": "MOTOROLA XOOM™",
"snippet": "The Next, Next Generation tablet."}
];
//console.log(Stations);
}
});
// $scope.phones = Stations;
// console.log(Stations);
}
私がこれをするかのように
function stationMenu($scope){
$scope.phones = [
{"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S."},
{"name": "Motorola XOOM™ with Wi-Fi",
"snippet": "The Next, Next Generation tablet."},
{"name": "MOTOROLA XOOM™",
"snippet": "The Next, Next Generation tablet."}
];
}
それは動作します....どうすればajax内で動作させることができますか