2013-07-29 45 views
0

類型我有AngularJS設置爲使用HTML5路線和它的URL像website.com/foo的偉大工程,但是當我創建子頁面,如路線沒有顯示:website.com/foo/bar它只在我的網站上點擊鏈接時顯示正確的頁面。如果我在瀏覽器中輸入url並嘗試直接訪問它,我會得到一個空白頁面部分,其中應該加載ng-view內容。AngularJS HTML子路由時,URL在

app.when('/promotion/events', { 
     templateUrl: '/assets/tpl/promotion/events/home.html', 
     controller: PromotionEventsCtrl 
    }); 

回答