rangeError:angularjs中超出了最大调用堆栈
我一直在尝试使用ngRoute模块,但出现了错误。。 顺便说一下,我已经下载了ngRoute模块rangeError:angularjs中超出了最大调用堆栈,angularjs,Angularjs,我一直在尝试使用ngRoute模块,但出现了错误。。 顺便说一下,我已经下载了ngRoute模块 var myApp = angular.module("myApp", ["ngRoute"]); myApp.controller("mainCtrl", ['$scope', function ($scope) { }]); myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $loc
var myApp = angular.module("myApp", ["ngRoute"]);
myApp.controller("mainCtrl", ['$scope', function ($scope) {
}]);
myApp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
$locationProvider.hashPrefix('');
$routeProvider
.when('/', {
templateUrl: "angular.html",
controller: "mainCtrl"
})
.when('/second', {
templateUrl: "second.html",
controller: "mainCtrl"
})
.when('/main', {
templateUrl: "main.html",
controller: "mainCtrl"
})
}]);
您是否尝试过在@alok上遵循文档?是的,我有..或者我在代码中遗漏了什么?