kittencup / angular2-ama-cn

angular2 随便问
692 stars 101 forks source link

如何写一个页面,不继承app.component中的页面? #230

Open bigggge opened 7 years ago

bigggge commented 7 years ago

比如,登录页面我可能不需要一些公共的html

HALOH commented 7 years ago

你把app.component中的公共模板也变成组件,登录页面控制不要显示不就行了

kunl commented 7 years ago

app component 只保留 router-view 就行了

hstarorg commented 7 years ago

利用路由来控制:https://github.com/hstarorg/ngx-modular-platform/blob/master/src/app.routing.ts