问题描述
我想运行一个简单的角度JS code,但我不能做到这一点
科尔多瓦与温泉UI
I want to run a simple Angular js code but I am not able to do itin Cordova with Onsen ui
我在下面得到一个错误的链接:
I am getting an error link below :
<一个href=\"https://docs.angularjs.org/error/ng/areq?p0=HelloCtrl&p1=not%20a%20function,%20got%20undefined\" rel=\"nofollow\">https://docs.angularjs.org/error/ng/areq?p0=HelloCtrl&p1=not%20a%20function,%20got%20undefined
我指的这个页面:
的
使用温泉1
p1.html:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy"/>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="css/onsenui.css">
<link rel="stylesheet" href="css/onsen-css-components.css">
<link rel="stylesheet" href="css/sliding_menu.css">
<link rel="stylesheet" type="text/css" href="css/index.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/angular/angular.min.js"></script>
<script type="text/javascript" src="cordova.js"></script>
<script>
ons.bootstrap();
var myApp = angular.module('myApp',[]);
myApp.controller('HelloCtrl', function($scope){
$scope.name = "Onsen UI!";
});
</script>
</head>
<body ng-app="myApp">
<div ng-controller="HelloCtrl">
<input type="text" ng-model="name">
<p>Hello {{name}}</p>
</div>
</body>
</html>
输出:
错误:
下面是我的目录结构:
推荐答案
解决它......
其实当我安装我的jQuery只复制在的jquery.js 从jQuery文件夹到我的js文件夹中,但现在我复制在整个jQuery的文件夹到JS文件夹并成功执行...
Actually when I installed jquery I copied only the jquery.js file from the jquery folder into my js folder but now I copied the whole jquery folder into the js folder and It executed successfully...
感谢您的支持家伙。
这篇关于无法运行角度JS code。与温泉科尔多瓦的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!