NG-點擊工作不離子鍵工作時,它說,在控制檯下面按鈕NG-點擊不離子
VM67 index.html:1 Uncaught ReferenceError: zPLysearch() is not defined
我一直在試圖解決這個問題,2小時,我做了沒有任何運氣。 這裏我的代碼,
<div class="col-90" >
<button ng-click="zPLysearch()" class="button button-delete">zPLY search</button>
</div>
,但同樣的功能使用類似如下它的正常工作
<div class="homecard wired" ng-show="show2" ng-click="zPLYsearch()">
</div>
這裏我的全HTML代碼
<ion-view title="zPLY Conf Tool">
<ion-content padding="true" class="content_background">
<div class=" homecard wired" ng-show="show2" ng-click="zPLYsearch()">
</div>
<div class="col-90" >
<button ng-click="zPLysearch()" class="button button-delete">zPLY search</button>
</div>
</ion-content>
</ion-view>
控制器代碼:
angular.module('wiredzplydetailscontroller', [])
.controller('wiredzplydetailsCtrl', function($scope,$rootScope,$http,$ionicModal,$ionicPlatform, $ionicLoading,$ionicPopup, $timeout, $location) {
$scope.zPLYsearch=function(){
}
});
你有在JS文件中定義的函數zPLysearch? –
是的我在控制器中定義。 – Ashok
請檢查以下答案,它是爲我工作。 –