1
我正在將我們的應用程序移動到Angular的過程中,這是我的路線應用程序的樣子,非常簡單。當Angular抓取home.html
插入到ng-view
時,Chrome陷入了無限循環,重新加載頁面直到最終崩潰。這發生在Google App Engine中,但是在WAMP上運行的代碼完全正常。
var app = angular.module('app', ['ngRoute']);
app.config(function($routeProvider) {
$routeProvider
// route for the home page
.when('/', {
templateUrl : "home.html",
controller : "mainController"
})
.when('/about', {
templateUrl : "about.html",
controller : "mainController"
})
.otherwise({
templateUrl : "home.html",
controller : "aboutController"
});
});
的app.yaml
application: activity-tracking
version: dev
runtime: python27
api_version: 1
threadsafe: false
handlers:
- url: /web/components
static_dir: web/components
builtins:
- remote_api: on
- deferred: on
inbound_services:
- warmup
libraries:
- name: django
version: "1.2"
我最好的猜測是,我需要有應用程序引擎忽略角請求獲得一個文件,並永遠只起到了index.html
將角將注入。它目前沒有做,導致我的無限循環去/home.html
,然後重定向回/index.html
等
而你的app.yaml?添加了 –
,減去無關的處理程序 –
我認爲您缺少根處理程序。和應用程序來顯示它。 –