# How to pass the '$' is not defined error?

**URL:** <https://discuss.emberjs.com/t/how-to-pass-the-is-not-defined-error/8523>\
**Category:** Testing\
**Created:** [August 7, 2015, 7:27am UTC](https://discuss.emberjs.com/t/how-to-pass-the-is-not-defined-error/8523 "2015-08-07T07:27:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mark\_duan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/mark_duan/32/10888_2.png) [@mark\_duan](https://discuss.emberjs.com/u/mark_duan)\
**Post date:** [August 7, 2015, 7:27am UTC](https://discuss.emberjs.com/t/how-to-pass-the-is-not-defined-error/8523/1 "2015-08-07T07:27:38Z")

</div>

I just begin to test my app, and got many ‘$’ is not defined errors.  
In the .jshintrc file, ‘$’ is in the predef array.  
Do I have to use Ember.$?

```
{
  "predef": [
    "document",
    "window",
    "location",
    "setTimeout",
    "$",
    "-Promise",
    "define",
    "console",
    "visit",
    "exists",
    "fillIn",
    "click",
    "keyEvent",
    "triggerEvent",
    "find",
    "findWithAssert",
    "wait",
    "DS",
    "andThen",
    "currentURL",
    "currentPath",
    "currentRouteName"
  ],
  "node": false,
  "browser": false,
  "boss": true,
  "curly": false,
  "debug": false,
  "devel": false,
  "eqeqeq": true,
  "evil": true,
  "forin": false,
  "immed": false,
  "laxbreak": false,
  "newcap": true,
  "noarg": true,
  "noempty": false,
  "nonew": false,
  "nomen": false,
  "onevar": false,
  "plusplus": false,
  "regexp": false,
  "undef": true,
  "sub": true,
  "strict": false,
  "white": false,
  "eqnull": true,
  "esnext": true
}

```

---

<div class="post-metadata">

**Author:** ![Panman8201](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/panman8201/32/17727_2.png) [@Panman8201](https://discuss.emberjs.com/u/Panman8201)\
**Post date:** [August 7, 2015, 12:39pm UTC](https://discuss.emberjs.com/t/how-to-pass-the-is-not-defined-error/8523/2 "2015-08-07T12:39:47Z")

</div>

I use [`Ember.$`](http://emberjs.com/api/#method__) instead. And if you’re in a Component, always use [`this.$`](http://emberjs.com/api/classes/Ember.Component.html#method__)
