【发布时间】:2017-02-07 01:02:28
【问题描述】:
我需要将 URL 参数传递给控制器。在下面的 URL 中,我需要将 ID 参数传递给控制器。
http://localhost/branch/more.php?id=20
将 ID URL 参数传递给我在下面给出的控制器。
app.controller('customersCtrl', function($scope, $http) {
$http.get("message.php?id=").then(function (response) {
$scope.myData = response.data.message;
});
所以,message.php?id=Parameter ID Here一定是这样的。
【问题讨论】:
-
为什么要删除答案?
标签: angularjs