【发布时间】:2015-04-27 11:31:22
【问题描述】:
在我的 ionic 空白应用程序中,我有两个 html 文件 index.html 和 category.html。 我在 app.js 中为 index.html 编写控制器,例如
.controller('AppCtrl',function($scope){
$scope.menu = function() {
console.log('yesytest');
window.location = "category.html";
};
})
这工作正常,到达类别页面后,我在 app.js 中创建另一个控制器
controller('categoryCtrl',function($scope){
console.log('ffffffffff');
$scope.beauty = function() {
console.log('yesytest');
window.location = "categorydetails.html";
};
});
我在 category.html 内的按钮上添加了一个 ng-click 功能,但是当我点击该按钮时,它没有调用控制器?
【问题讨论】:
标签: angularjs cordova ionic-framework ionic