angular.js - angular2 RC2 official routing documentation is wrong?
習慣沉默
習慣沉默 2017-05-15 17:02:48
0
1
577

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?

習慣沉默
習慣沉默

reply all(1)
阿神

There is nothing wrong with the document, it’s just a small oversight. The @angular/core@angular/common都是2.0.0-rc.2,所以你就以为也@angular/routeryou 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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template