小编j-t*_*ova的帖子

Augular 2路由器动画 - 找不到模块'@ angular/platform-b​​rowser/animations'

我一直关注可以在以下链接找到的Angular 2路由和导航示例:https://plnkr.co/edit/I4ArEQTniO7MJtfzpBWl?p = info.

当我运行转换器时,我收到错误消息:"client/app/app.module.ts(5,41):error TS2307:找不到模块'@ angular/platform-b​​rowser/animations'."

根据我的systemjs.config.js(如下所示),我希望模块'@ angular/platform-b​​rowser/animations'成为文件,"platform-b​​rowser-animations.umd.js"位于node_modules/@ angular/platform-b​​rowser/bundles,但它不存在.

//systemjs.config.js
(function (global) {
  System.config({
    paths: {
  // paths serve as alias
  'npm:': 'node_modules/'
   },
  // map tells the System loader where to look for things
  map: {
  // our app is within the app folder
  app: 'app',

  '@angular/animations': 'npm:@angular/animations/bundles/animations.umd.js',
  '@angular/animations/browser': 'npm:@angular/animations/bundles/animations-browser.umd.js',
  '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
  '@angular/common': 'npm:@angular/common/bundles/common.umd.js',
  '@angular/compiler': 'npm:@angular/compiler/bundles/compiler.umd.js',
  '@angular/platform-browser': 'npm:@angular/platform-browser/bundles/platform-browser.umd.js',
  '@angular/platform-browser/animations': 'npm:@angular/platform-browser/bundles/platform-browser-animations.umd.js',
  '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
  '@angular/http': 'npm:@angular/http/bundles/http.umd.js',
  '@angular/router': 'npm:@angular/router/bundles/router.umd.js',
  '@angular/router/upgrade': 'npm:@angular/router/bundles/router-upgrade.umd.js',
  '@angular/forms': 'npm:@angular/forms/bundles/forms.umd.js',
  '@angular/upgrade': 'npm:@angular/upgrade/bundles/upgrade.umd.js',
  '@angular/upgrade/static': 'npm:@angular/upgrade/bundles/upgrade-static.umd.js', …
Run Code Online (Sandbox Code Playgroud)

javascript animation platform angularjs

18
推荐指数
1
解决办法
2万
查看次数

标签 统计

angularjs ×1

animation ×1

javascript ×1

platform ×1