# ReferenceError: transitionTo is not defined

**URL:** <https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908>\
**Category:** Uncategorized\
**Created:** [November 10, 2016, 9:32am UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908 "2016-11-10T09:32:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harun\_Tuncay](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/harun_tuncay/32/16888_2.png) [@Harun\_Tuncay](https://discuss.emberjs.com/u/Harun_Tuncay)\
**Post date:** [November 10, 2016, 9:32am UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/1 "2016-11-10T09:32:46Z")

</div>

Hi.I am tying to save a post object.

```
savePost(newPost){
newPost.save().then(()=>transitionTo('posts.index'));

```

I get back the error in the title." transitionTo is now defined".I have tried curly braces syntax too. And it is not only after “save()”.I can’t do transition.Always this error.Please send help ^-^

---

<div class="post-metadata">

**Author:** ![zoltan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zoltan/32/16699_2.png) [@zoltan](https://discuss.emberjs.com/u/zoltan)\
**Post date:** [November 10, 2016, 12:24pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/2 "2016-11-10T12:24:00Z")

</div>

I suppose, the `savePost(newPost)` is an action in a route handler (in a route file). A simple `this` is missing.

```auto
actions: {
  savePost(newPost) {
    newPost.save().then( () => this.transitionTo('posts.index') );
  }
}

```

`transitionTo` is an Ember.Route method: [api doc](http://emberjs.com/api/classes/Ember.Route.html#method_transitionTo)

So, the `this` refers back to the Ember.Route class.

---

<div class="post-metadata">

**Author:** ![Harun\_Tuncay](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/harun_tuncay/32/16888_2.png) [@Harun\_Tuncay](https://discuss.emberjs.com/u/Harun_Tuncay)\
**Post date:** [November 10, 2016, 12:31pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/3 "2016-11-10T12:31:21Z")

</div>

Yes yes yes.Thank you so much.Sometimes those typos ruin everything ha 🙂

---

<div class="post-metadata">

**Author:** ![Harun\_Tuncay](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/harun_tuncay/32/16888_2.png) [@Harun\_Tuncay](https://discuss.emberjs.com/u/Harun_Tuncay)\
**Post date:** [November 10, 2016, 12:33pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/4 "2016-11-10T12:33:42Z")

</div>

Btw you are my hero.Great tutorial.I want to thank you for that Great Resource.I have never seen any other like that.Ember 2.9, covers actions, components, and some addons.Also FireBase. 🙂I feel like i am talking to my hero right know ^.^

---

<div class="post-metadata">

**Author:** ![zoltan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zoltan/32/16699_2.png) [@zoltan](https://discuss.emberjs.com/u/zoltan)\
**Post date:** [November 10, 2016, 1:05pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/5 "2016-11-10T13:05:55Z")

</div>

Thank you. 😃 I’m glad you learned a lot, however the real Hero here is You, because you learned a new framework, you can build web applications quickly and I’m sure you will help to other developers soon. Keep up the great work! 😃

---

<div class="post-metadata">

**Author:** ![Harun\_Tuncay](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/harun_tuncay/32/16888_2.png) [@Harun\_Tuncay](https://discuss.emberjs.com/u/Harun_Tuncay)\
**Post date:** [November 10, 2016, 1:51pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/6 "2016-11-10T13:51:24Z")

</div>

I really do hope to be able to help beginners like my self right now.🙂 But i have a long way to do so. May i ask you a small but important question via special message ?

---

<div class="post-metadata">

**Author:** ![zoltan](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/zoltan/32/16699_2.png) [@zoltan](https://discuss.emberjs.com/u/zoltan)\
**Post date:** [November 10, 2016, 6:53pm UTC](https://discuss.emberjs.com/t/referenceerror-transitionto-is-not-defined/11908/7 "2016-11-10T18:53:49Z")

</div>

Yes of course, don’t hesitate.
