search

Home  >  Q&A  >  body text

angular.js - angular2 RC2官方路由文档有误?

https://angular.io/docs/ts/latest/guide/router.html

里是这样引入

import { provideRouter, RouterConfig } from '@angular/router';

但是在IDE里报错,模块没有这两个export,这个官方文档写错了?

習慣沉默習慣沉默2744 days ago527

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