我想将用户路由到home
屏幕,如下例所示。
我的问题是,更多路由不允许单个name
的多个路由路径。
如何在angularjs中创建其他类似的东西?
当所有无效路径进入name="home"
<more-route name="home" path="/home"></more-route>
<more-route name="home" path="/home/:mutation"></more-route>
<more-route name="home" path="/home/words/:mutation/:hu"></more-route>
答案 0 :(得分:1)
我想你想要这个:
<more-route name="home" path="/home">
<more-route name="mutation" path="/:mutation"></more-route>
<more-route name="words" path="/words/:mutation/:hu"></more-route>
</more-route>
<more-route-selector selectedParams="{{params}}">
<iron-pages>
<section route="home">
<template if="{{ route('mutation').active }}">
...
</template>
<template if="{{ route('words').active }}">
...
</template>
</section>
</iron-pages>
</more-route-selector>