https://angular.io/docs/ts/latest/guide/router.html
This is how it is introduced
import { provideRouter, RouterConfig } from '@angular/router';
But an error is reported in the IDE. The module does not have these two exports. Is this official document written wrong?
There is nothing wrong with the document, it’s just a small oversight. The
@angular/core
,@angular/common
都是2.0.0-rc.2
,所以你就以为也@angular/router
you quoted is also the same version, right?But it’s actually
@angular/router
是@3.0.0-alpha.3
(简直莫名其妙有没有!?)。不信你强制安装npm install @angular/router@3.0.0-alpha.7
in the official website documentation, then try again