路由器绑定实际用于什么

编程入门 行业动态 更新时间:2024-10-25 12:17:30
本文介绍了路由器绑定实际用于什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

什么是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.

更多推荐

路由器绑定实际用于什么

本文发布于:2023-11-25 22:32:12,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1631613.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:绑定   路由器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!