【发布时间】:2016-04-26 18:44:27
【问题描述】:
我的 ionic 应用程序出现问题。我通过 ionic serve 在网络浏览器上编写了整个应用程序。现在我想在安卓设备上发布我的应用。
在网络上一切正常,但是当我尝试在我的 android 4.3 或 5.5 设备上启动应用程序时,当我单击登录页面上的登录按钮时没有任何反应。
这是我的登录模板:
<ion-view view-title="Anmelden" name="login-view">
<ion-content class="padding">
<div class="list list-inset">
<label class="item item-input">
<input type="text" placeholder="Username" ng-model="data.username">
</label>
<label class="item item-input">
<input type="password" placeholder="Passwort" ng-model="data.password">
</label>
</div>
<button class="button button-block button-positive" ng-click="login(data)">Login</button>
</ion-content>
</ion-view>
我的路由(简化),在我的app.js中run函数之后:
.config(function ($stateProvider, $urlRouterProvider, USER_ROLES) {
$stateProvider
.state('login', {
url: '/login',
templateUrl: 'templates/login.html',
controller: 'LoginCtrl'
})
$urlRouterProvider.otherwise('/login');
})
我的 LoginCtrl 中的实际函数没有被调用,所以我假设我的模板不知何故与其路由无关。 该按钮只是显示为死,当您按下它时没有任何反应(还在我的网络服务器上监视传入的 http 请求)。
我也尝试从 ng-click 更改为 on-tap。 有人可以帮助我吗?非常感谢。
问候
【问题讨论】:
标签: android angularjs button ionic-framework