什么是Angular2路由器中实际使用的路由器绑定.特别是路由器3.0(最新的Angular RC4路由器)?任何有效的代码或插件吗?
What are Router Bindings actually used for in Angular2 router. specially the Router 3.0 (newest Angular RC4 router)? Any working code or plunker?
angular.io/docs/ts/latest/api/router-deprecated/index/ROUTER_BINDINGS-let.html
推荐答案名称刚刚从ROUTER_BINDINGS更改为ROUTER_PROVIDERS,而@Component(),@Directive()或@Pipe()的bindings参数也是如此装饰器已重命名为providers,它们实际上是路由器实现和由路由器实现提供的服务,将被注入您的代码中.
The name was just changed from ROUTER_BINDINGS to ROUTER_PROVIDERS as were the bindings parameter of the @Component(), @Directive() or @Pipe() decorator was renamed to providers and they actually are the router implementation and services provided by the router implementation to be used injected in your code.
在当前版本中,此功能导出为功能 provideRouter()
In the current version this feature is exported as function provideRouter()
似乎ROUTER_PROVIERS将再次重命名为RouterModule,或者与RC.5中引入的模块类似.
It looks like ROUTER_PROVIERS is going to be renamed again to RouterModule or similar with the introduction of modules in RC.5.
更多推荐
路由器绑定实际用于什么
发布评论