I am trying to integrate a three.js scene into an angular 2 page. I am new to angular 2 and javascript, I have included the three.js file in the script tag, in index.html, that is, and in the scene.component.ts file I have one the code...
//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();
}
///////////////
The problem is displayed on the line - import {THREE} of "three-js / three";
This is in the same directory path as 'angular2 / core'
Thanks in advance.
source
share