Hello,
When I run my application on browsers, it works perfectly; however buttons do not work when I run my app on the device.
HTML code:
<ion-content class="center" scroll="false">
<div class="row">
<button class="button button-block button-positive" ui-sref="signup">
</button>
</div>
<div class="row">
<button type="button" class="button button-block button-positive" ng-click="home.memberLogin()">
</button>
</div>
</ion-content>
JS Controller
(function(){
angular
.module('home')
.controller('HomeController', ['$auth','$http','$state','$rootScope', HomeController]);
function HomeController($auth,$http,$state,$rootScope) {
var self = this;
self.memberLogin = function() {
if($auth.isAuthenticated()){
$state.go('member.main');
}else{
$state.go('login');
}
};
}
})();
Here, my first button works because I used ui-sref but other button does not work. Is there a solution? Thanks
EDIT:
I found the problem: I just needed to remove "/"
before "templates"
. It was working fine in the browser not on the device
templateUrl: "templates/login.html",