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