vendor / @ angular / router-deprecated 404(Not Found)

时间:2016-08-11 17:41:31

标签: angular

我的angualar2应用中没有angualr/router-deprecated,所以我安装了它:

 npm i @angular/router-deprecated

我已经取消了node-module文件夹,我现在就在那里,我可以做到这一点

import {RouteParams} from '@angular/router-deprecated' without any error.

不幸的是,在运行时我的应用程序抱怨:

GET http://127.0.0.1:4200/vendor/@angular/router-deprecated 404 (Not Found)

似乎应用程序希望在供应商文件夹中找到router-deprecated

同时它在node_module中,那我该怎么办?

这是system.config.ts:

const barrels: string[] = [
  // Angular specific barrels.
  '@angular/core',
  '@angular/common',
  '@angular/compiler',
  '@angular/forms',
  '@angular/http',
  '@angular/router',
  '@angular/platform-browser',
  '@angular/platform-browser-dynamic',

  // Thirdparty barrels.
  'rxjs',

  // App specific barrels.
  'app',
  'app/shared',
  /** @cli-barrel */
];

当我手动更新桶时:

'@angular/router-deprecated',

该应用抱怨:

No provider for RouteParams!
ORIGINAL STACKTRACE:

0 个答案:

没有答案