简体   繁体   中英

How to setup input bindings for a component when it's created by router-outlet?

当路由器创建组件时,如何设置属性绑定?

It is not supported to use bindings for components added by the router. See also this discussion https://github.com/angular/angular/issues/4452

Use a shared service to communicate with components added by the router. For details see https://angular.io/docs/ts/latest/cookbook/component-communication.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM