Im从Ionic和Phonegap开始。我得到了html内部的两个类的列表元素Angular.js,HTML列表元素
<body ng-app="todo">
<div class="list">
<a class="item item-icon-left" ng-click="derecha()" ng-controller="derecha"> Calama </a>
<a class="item item-icon-left" ng-click="abajo()" ng-controller="abajo"> Ollagüe </a>
</body>
在app.js中我得到了以下内容。
angular.module( 'TODO',[ '离子'])
.controller('derecha', function($scope, $ionicModal) {
console.log("derecha");
});
.controller('abajo', function($scope, $ionicModal) {
console.log("abajo");
})
当我试图把它的浏览器,这些错误会出现:
Error: [$injector:modulerr] Failed to instantiate module todo due to:
[$injector:nomod] Module 'todo' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.2.25/$injector/nomod?p0=todo
我花了两天时间学习这个问题,但根本没有答案。有人能够帮助我使用列表中的两个元素来调用两个不同的函数吗?
由于事先 --in
你包括你的js
问候, 丹尼尔脚本文件? – 2014-12-04 21:28:08