AngularJS : ng-click不起作用
AngularJS : ng-click不起作用
我是AngularJs的新手,ng-click不按预期工作。我在互联网上搜索了,按照教程操作(那时是有效的)- 但现在不工作了!!!
我的代码:
![]()
{{data.fname}}
这是我的控制器
//关注控制器 app.controller('FollowsController', function($scope, $http) { var ukey = window.localStorage.ukey; $scope.myform ={}; $scope.myform.reports =""; $http.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded"; var dataObject = "usertoken="+ukey; var responsePromise = $http.post(server_url+"follows/", dataObject,{}); responsePromise.success(function(dataFromServer, status, headers, config) { $scope.myform.all_followers = dataFromServer; console.log(dataFromServer); //alert(dataFromServer); $scope.showDetail = function(index) { profileusertoken = index; $scope.ons.navigator.pushPage('profile.html'); } function showDetail2(index) { alert("here"); } $scope.showDetail2 = showDetail2; }); });
showDetail和showDetail2都不起作用
请帮忙
谢谢