質問

I created routes below, the story/new doesn't show it's story-new.html template. It always go to story-view.html because I got dynamic :storyID so new consider as a dynamic name.

How to combine them so /new will route to the story-new.html or I got wrong with my route structure?

$routeProvider.when('/story/new', {
 templateUrl: 'js/modules/story-new/story-new.html'
});

$routeProvider.when('/story/:storyID', {
 templateUrl: 'js/modules/story-view/story-view.html'
});
役に立ちましたか?

解決

I'm unsure this works, but switching them around could solve your problem.

他のヒント

Check the following plunker

http://plnkr.co/edit/pgQu8nwGYrOQusZnThUy?p=preview

Let me know if anything

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top