search

Home  >  Q&A  >  body text

angular.js - angular2 RC2 official routing documentation is wrong?

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?

習慣沉默習慣沉默2823 days ago560

reply all(1)I'll reply

  • 阿神

    阿神2017-05-15 17:04:48

    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

    reply
    0
  • Cancelreply