我在许多html文件中使用了ng-click但是在所有html ng-click工作正常但是如果我的filter.html ng-click fires功能两次我goggled并找到链接但我无法坚持认为。
这是链接: -
AngularJS ng-click fires twice
所以我在这里发布我的index.html: -
<html ng-app="ionicApp">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title>e-commerce</title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="lib/swiper/dist/css/swiper.min.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script type="text/javascript" charset="utf-8"
src="js/PushNotification.js"></script>
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="lib/ionic-zoom-view/dist/ionic-zoom-view.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
<!-- your app's js -->
<link rel="stylesheet"
href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
<script
src=" https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
<!-- <script -->
<!-- src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> -->
<script
<!-- src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script> -->
<script
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script
src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
<script
src="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
<link rel="stylesheet"
href="https://fonts.googleapis.com/icon?family=Material+Icons">
<script src="js/app.js"></script>
<script src="js/checklist-model.js"></script>
<!-- controllers -->
<script src="js/controllers/home-controller.js"></script>
<script src="js/angular-translate.min.js"></script>
<script src="js/ionic-ratings.js"></script>
<script src="lib/swiper/dist/js/swiper.js"></script>
<!--<script src="../bower_components/angular/angular.js"></script>-->
<script src="lib/angular-swiper/dist/angular-swiper.js"></script>
</head>
<body ng-controller="MainCtrl">
<ion-nav-view></ion-nav-view>
</body>
</html>
当我尝试调用openPopover($ event)函数时,它会触发两次但是当我在index.html中评论下面提到的行时,openPopover($ event)只会跳过一次但是我的平滑加载器停止工作。
行: -
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
这件事真让我抓狂。任何帮助都会非常感激 感谢