簡體   English   中英

避免錯誤 <yourObject> 在Ember.js中未定義

[英]Avoid error <yourObject> is not defined in Ember.js

每次我為Ember.js應用程序安裝一個Bower模塊時,將它們添加到ember-cli-build.js ,都可以在組件,控制器,服務等內部使用它。但是JSHint給我一個錯誤,如下所示:

'RRule' is not defined.

要么

'Stream' is not defined.

我怎樣才能使它們無效?

這是我在ember-cli-build.js

  app.import('bower_components/rrule/lib/rrule.js');
  app.import('bower_components/rrule/lib/nlp.js');
  app.import('bower_components/streamjs/stream.js');

在文件.jshintrc ,添加"RRule""Stream"predef

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM