1
當我有角的設置路由是這樣的:角路由缺少尾隨斜線
$stateProvider
.state('loginHome',
{
url: "/",
templateUrl: "scripts/features/account/views/login.html"
})
.state('login',
{
url: "/login",
templateUrl: "scripts/features/account/views/login.html"
})
所以,當用戶瀏覽到:
http://localhost/MyApp/
http://localhost/MyApp/login
登錄視圖渲染
如何設置路線,當用戶輸入以下URL時,它將導航它們以登錄:
http://localhost/MyApp (no trailing slash)