0
我试图在Aurelia应用程序中使用querystring程序包,但在浏览器控制台中出现Cannot read property 'stringify' of undefined
错误。使用jspm导入ES6模块并在Aurelia中使用
这是我所采取的步骤:
- 安装使用
jspm install querystring
- 添加
import {querystring} from 'querystring'
到奥里利亚模型 用在我的模型,像这样:
import {querystring} from 'querystring'; export class App { criteria_words; criteria_location; constructor() { } submit() { console.log(querystring.stringify(this)); } }
我错过了什么步骤?
查询字符串是不确定的。这意味着进口出了问题。你确定它安装正确吗? – Randy