Could you please tell me why alerts display two times on button click?
here is my plunker http://plnkr.co/edit/vtmYAG2d1gmnPjnxovJw?p=preview
/*global define, console */
define(['app'], function(app){
'use strict';
app.controller('LoginCtrl', ['$scope', function($scope) {
$scope.login = function () {
alert("Login is clicked")
};
}]);
});
If you use a newer version of Ionic it works: http://plnkr.co/edit/K2BLrUyOEeoDxHc9LyTl?p=preview
I used http://code.ionicframework.com/1.0.0/js/ionic.bundle.min.js
your example uses http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.min.js
requirejs.config({
paths: {
ionic:'http://code.ionicframework.com/1.0.0/js/ionic.bundle.min',
},
shim: {
ionic : {exports : 'ionic'}
}, priority: [
'ionic'
],
deps: [
'bootstrap'
]
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With