【发布时间】:2015-10-24 06:59:02
【问题描述】:
我在我的网站中使用这个简单的脚本,但它在控制台中抛出错误为“超出最大调用堆栈大小”
var myapp = angular.module("myApp", ['ngRoute']);
myapp.config(['$routeProvider', '$locationProvider', function ($routeProvider, $locationProvider) {
//$locationProvider.html5mode(true);
$routeProvider
.when('/', {
templateUrl: 'index.html',
}).when('/contact',
templateUrl: 'contact.html',
}).when('/google', {
templateUrl: 'http://www.google.co.in'
}).otherwise({
redirectTo: '/'
});
}]);
【问题讨论】:
-
修复语法错误和无效的跨域url