title: Ember 2 - Transition to route through component
body: <p>I am trying to make a pagination component for ember 2 app.
  Since it is a general purpose pagination component, I wanted to use it on many different routes. Because of that I need to somehow (in my mind) provide a name of my route for pagination links to work.</p>
  
  <p>I can pass in my route name (string) to the component easily:
  <code>{{pagination-component myRoute='myCurrentRouteName'}}</code>. And 
    inside of component: <code>{{link-to myRoute (query-params page=1)}}</code></p>
  
  <p>It works well for going to pages like: &lt;&lt; First, &lt; Previous, Next > , Last >>.</p>
  
  <p>But I also wanted to have a select box with options pointing to all the pages, where if user selects a page, I can transition into that route with queryParams similar to this: <code>myRoute?page=selectedPage</code>.
  All the tutorials for ember say that transitioning within the component is a no-no. </p>
  
  <p>But how do I do it instead, given that I want my pagination to be generic and I don't want to have action within every single route that deals with pagination and provide same exact transitioning?</p>
  
  <p>So far I found that I can inject the <a href="https://stackoverflow.com/questions/33334502/possible-to-make-a-route-transition-inside-of-a-service-in-ember/33335230#33335230">'-routing'</a> into the component, which can work for transitioning within the component, but it also doesn't quiet work for some reason. Plus people say that it is private and unreliable.
  I also tried making a Route Mixin with action so I can simply <code>sendAction</code> from the component with the <code>selectedPage</code>, but I don't know how to get the router (in order to call <code>router.transitionTo</code>) within my Mixin.</p>