简体   繁体   English

0Uncaught ReferenceError:未定义角度,Uncaught错误:[$ injector:modulerr]

[英]0Uncaught ReferenceError: angular is not defined , Uncaught Error: [$injector:modulerr]

hey iam trying to move to another page by clicking the button using angular js My js is home.js, but i couldn't make it. 嘿,我想尝试通过使用angular js单击按钮移动到另一页。我的js是home.js,但我做不到。 also i can't alert any data in that js 我也无法提醒该js中的任何数据

    var base_url="http://localhost/cityMob/mob/"; 
 var app = angular.module('home', []);       
  app.controller('homeCtrl', function ($scope, $http,$window) {

$scope.cityname = null;
$scope.cityName = [];
$scope.sign_up = function() {
    $window.location.href = 'signup.html';
};


 });


      <body  class="bodybgColor ui-mobile-viewport ui-overlay-a" ng-app="home" ng-controller="homeCtrl"> 

I have updated your html code as and seems working 我已经更新了您的html代码,并且似乎可以正常工作

<body  class="bodybgColor ui-mobile-viewport ui-overlay-a" ng-app="home" ng-    controller="homeCtrl"> 
{{ 9+9 }}
<button ng-click="sign_up()"> sign up</button>
</body>

here is link http://dojo.telerik.com/ERazU hope this will help you 这里是链接http://dojo.telerik.com/ERazU希望这会对您有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM