Javascript 角度2模块(燃料ui)不';如果它';从另一个目录加载

Javascript 角度2模块(燃料ui)不';如果它';从另一个目录加载,javascript,angularjs,angular,systemjs,fuelux,Javascript,Angularjs,Angular,Systemjs,Fuelux,我们正在使用Gulp(刚从ngcli迁移过来)来构建angular2项目,在这里我使用Fuel ui 我有一个奇怪的错误。我在我们的一个组件中使用Fuel ui的警报组件。如果我们从中引用燃料ui system.config.js中的node_modules/fuel ui文件夹一切正常。如果我从build/vendor/fuel ui引用它,它将失败,并出现以下错误: EXCEPTION: Unexpected directive value 'undefined' on the Vi

我们正在使用Gulp(刚从ngcli迁移过来)来构建angular2项目,在这里我使用Fuel ui

我有一个奇怪的错误。我在我们的一个组件中使用Fuel ui的警报组件。如果我们从中引用燃料ui system.config.js中的node_modules/fuel ui文件夹一切正常。如果我从build/vendor/fuel ui引用它,它将失败,并出现以下错误:

    EXCEPTION: Unexpected directive value 'undefined' on the View of component 'MyAlertComponent'
platform-browser.umd.js:1900 EXCEPTION: Unexpected directive value 'undefined' on the View of component 'MyAlertComponent'BrowserDomAdapter.logError @ platform-browser.umd.js:1900
platform-browser.umd.js:1900 STACKTRACE:BrowserDomAdapter.logError @ platform-browser.umd.js:1900
platform-browser.umd.js:1900 Error: Unexpected directive value 'undefined' on the View of component 'MyAlertComponent'
    at new BaseException$1 (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:971:27)
    at CompileMetadataResolver.getViewDirectivesMetadata (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:12539:27)
    at RuntimeCompiler._getCompiledTemplate (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14619:40)
    at RuntimeCompiler._getTransitiveCompiledTemplates (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14637:84)
    at eval (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14640:81)
    at Array.forEach (native)
    at RuntimeCompiler._getTransitiveCompiledTemplates (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14640:45)
    at eval (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14640:81)
    at Array.forEach (native)
    at RuntimeCompiler._getTransitiveCompiledTemplates (http://127.0.0.1:3000/node_modules/@angular/compiler/bundles/compiler.umd.js:14640:45)BrowserDomAdapter.logError @ platform-browser.umd.js:1900
zone.min.js:1 Error: Error: Unexpected directive value 'undefined' on the View of component 'MyAlertComponent'
systemjs.config.js的相关部分: 工作正常,无错误:

var map = {
        ...

    "fuel-ui":                     "node_modules/fuel-ui/bundles",
    ...
        };
不工作,出现异常:

var map = {
        ...

    "fuel-ui":                     "build/vendor/fuel-ui/bundles",
    ...
        };
组件的相关部分:

import {Component, Input,ElementRef} from '@angular/core';
import {Alert} from 'fuel-ui/fuel-ui';

@Component({
  host: {
    '(document:click)': 'onClick($event)',
  },
  selector: 'my-alert',
  templateUrl: './app/components/shared/my-alert.component.html',
  directives: [ Alert ]  
})
export class MyAlertComponent {
package.json的一部分:

    "fuel-ui": "0.3.9",
    "jquery": "2.1.3",
    "ng2-bootstrap": "1.0.24",
    "node-sass": "^3.7.0",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.6",
    "systemjs": "0.19.26",
    "ts-node": "^0.5.5",
    "tslint": "^3.6.0",
    "typescript": "^1.8.10",
    "typings": "^1.3.2",
"typings": "^1.3.2",
两个位置的文件相同。在这两种情况下都会加载fuel-ui.js。任何地方都没有404错误。在这两种情况下,加载的js文件的加载顺序是相同的

第一个配置仍然有效,第二个配置则无效。 我尝试对system.config.js中的所有其他引用包执行相同的操作,除了fuel ui之外,所有东西都可以在我想要使用的任何位置工作


你知道这里出了什么问题吗

我想这可能会有所帮助。请尝试以下链接 Github- 如果子组件在父组件上声明为相同,则可能会出现问题。
确保您的子组件在父组件之前声明。

感谢@tec goblin启动赏金。其他人:我正在处理这个问题。对我来说,Systemjs的加载顺序似乎有问题。js文件以相同的物理顺序加载。如果我在Chrome中查看网络选项卡,一切看起来都一样。我能确定的唯一区别是引用的fuel ui的不同位置。这两个地方的文件是相同的。