问题
Hello try integrating aframe in the following way:
npm install aframe --save
setup the
angular-cli.json
"scripts": ["../node_modules/aframe/dist/aframe-master.js"]
Download the typings from https://github.com/devpaul/aframe-typings/blob/master/src/AFRAME.d.ts
setup the
tsconfig.json
"files":["typings/AFRAME.d.ts"]
And I get the following error: Cannot find namespace 'THREE'
回答1:
In src/polyfills.ts
you can import 'aframe';
before you import 'zone.js/dist/zone'
来源:https://stackoverflow.com/questions/44425128/how-to-integrate-aframe-to-my-project-angular-cli