【发布时间】:2016-10-17 11:24:26
【问题描述】:
我正在尝试将 three.js 场景集成到 Angular 2 页面中。我是 Angular 2 和 javascript 的初学者,我在 script 标签中包含了 three.js 文件,在 index.html 中,即在 scene.component.ts 文件中我有这样的代码......
//scene.component.ts
import { Component } from 'angular2/core';
import { THREE } from 'three-js/three';
@Component({
selector: 'ps-scene',
templateUrl: 'app/webgl/scene.component.html'
})
export class SceneComponent{
scene = new THREE.Scene();
}
///////////////
问题出现在这一行 - import { THREE } from 'three-js/three';
这与 'angular2/core' 在同一目录路径中
提前致谢。
【问题讨论】:
标签: angular three.js angular2-directives