How do I extend RouterOutlet when using the new router in RC.1

后端 未结 2 1544
耶瑟儿~
耶瑟儿~ 2021-01-05 16:49

I can\'t seem to extend RouterOutlet when using the new router in RC.1

Example:

import { Directive } from \'@angular/core\';
import { Router, ROUTER_         


        
2条回答
  •  情深已故
    2021-01-05 17:24

    RouterOutlet and RouterLink are not exported from @angular/router. This was fixed already recently and I'd expect this fix to be included in RC.2.

    You can import them from the private path (src/...) as a workaround until the new version is published.

    Hint

    That said, there is again a new router work in progress. If you currently working on migrating from the beta router or @angular/router-derprecated to @angular/router it's probably better to postpone until the new new router is out.

提交回复
热议问题