How do I integrate aframe into my ANGULAR -CLI project?

Hi try integrating aframe like this:

  • npm install aframe --save

  • customize angular-cli.json

    "scripts": ["../node_modules/aframe/dist/aframe-master.js"]
    
          

  • Download vise from https://github.com/devpaul/aframe-typings/blob/master/src/AFRAME.d.ts

  • customize tsconfig.json

    "files":["typings/AFRAME.d.ts"]
    
          

And I get the following error: Unable to find namespace "THREE"

+3


source to share


1 answer


In src/polyfills.ts

you can import 'aframe';

in front of youimport 'zone.js/dist/zone'



+1


source







All Articles