如何将 aframe 集成到我的项目 ANGULAR-CLI 中? [英] How to integrate aframe to my project ANGULAR-CLI?

查看:23
本文介绍了如何将 aframe 集成到我的项目 ANGULAR-CLI 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,请尝试通过以下方式集成 aframe:

Hello try integrating aframe in the following way:

  1. npm install aframe --save

设置angular-cli.json

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

  • https 下载类型://github.com/devpaul/aframe-typings/blob/master/src/AFRAME.d.ts

    设置tsconfig.json

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

  • 我收到以下错误:找不到命名空间三个"

    推荐答案

    src/polyfills.ts 中,您可以在 import 之前 import 'aframe';'zone.js/dist/zone'

    In src/polyfills.ts you can import 'aframe'; before you import 'zone.js/dist/zone'

    这篇关于如何将 aframe 集成到我的项目 ANGULAR-CLI 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆