我开始研究Ionic项目,当我尝试运行此代码时出现此错误: app.js Uncaught TypeError:app.controler不是函数(匿名函数) 我不知道在角度和角度与离子一起工作之间是否有任何区别。
感谢您的提前帮助
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<script src="lib/ionic/js/ionic.bundle.js"></script>
<script src="js/ng-cordova.min.js"></script>
<script src="cordova.js"></script>
<script src="js/app.js"></script>
</head>
<body ng-app="starter">
<!-- <div class="bar bar-header bar-dark">
<h1 class="title">Login</h1>
</div> -->
<div ng-controller="tasks" ng-repeat="t in task" style="margin-top:40px;">
<ul class="list">
<a href="trabalho.html"><li class="item">
{{t}}
</li></a>
</ul>
</div>
<a href="index.html" class="button button-assertive">Sair</a>
</body>
</html>
角:
var app = angular.module('starter', ['ionic']);
app.run(function($ionicPlatform) {
$ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
// for form inputs)
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
// Don't remove this line unless you know what you are doing. It stops the viewport
// from snapping when text inputs are focused. Ionic handles this internally for
// a much nicer keyboard experience.
cordova.plugins.Keyboard.disableScroll(true);
}
if(window.StatusBar) {
StatusBar.styleDefault();
}
});
});
app.controler('tasks',function($scope){
$scope.task = ["Liveware","Casa","Inatel"];
});