Angularjs 角度装载主路线,而不是指定路线
我在Angular应用程序中使用$routeProvider。我有8条不同的路线。当我在浏览器中键入 它载着我的主要路线 然后我必须手动将注册添加到URL 知道为什么它加载的是主路线而不是指定的路线吗 谢谢你的帮助 尝试这样编辑:Angularjs 角度装载主路线,而不是指定路线,angularjs,route-provider,Angularjs,Route Provider,我在Angular应用程序中使用$routeProvider。我有8条不同的路线。当我在浏览器中键入 它载着我的主要路线 然后我必须手动将注册添加到URL 知道为什么它加载的是主路线而不是指定的路线吗 谢谢你的帮助 尝试这样编辑: $routeProvider.when("/", { templateUrl: "templates/landingPage.html", }); $routeProvider.when("/signUp", { template
$routeProvider.when("/", {
templateUrl: "templates/landingPage.html",
});
$routeProvider.when("/signUp", {
templateUrl: 'templates/signInView.html',
controller:"PageController"
});
你能提供你的路线表吗?看起来还可以。你的html中有ng视图吗?是的,我有,ng视图刚刚试过,主路径是唯一的加载路径。它不会加载任何其他路线。你能提供视图吗?