Angular2 rc1, new router and passing data

前端 未结 2 1120
星月不相逢
星月不相逢 2020-12-11 18:32

Used to have, with deprecated router, a few components that routed to the same component:

Some Component

import {Component, Injector         


        
2条回答
  •  余生分开走
    2020-12-11 19:10

    Wait for Angular2 to add the data back. In my case, a service that decides which data service is needed could be injected via DI. I found that to be an overkill, it simply is a passing parameters just like it's in URL query strings. The only difference was that the parameter shouldn't be visible to user for a better experience.

    Source:

    http://www.github.com/angular/angular/issues/8515

提交回复
热议问题