Skip to content

Instantly share code, notes, and snippets.

@SeanRoberts
Created November 26, 2014 16:03
Show Gist options
  • Save SeanRoberts/af02ba34d5b80f46c61e to your computer and use it in GitHub Desktop.
Save SeanRoberts/af02ba34d5b80f46c61e to your computer and use it in GitHub Desktop.
# For more information see: http://emberjs.com/guides/routing/
OH.Router.map ()->
@resource 'listings', path: '/', ->
@route 'show', path: '/listings/:id'
@resource 'itinerary', path: '/itinerary/:id'
@resource 'realtors', path: '/realtors', ->
@route 'show', path: ':id'
@route 'contact', path: ':id/contact'
@route 'page', path: '/:slug'
OH.Router.reopen
location: 'history'
notifyGoogleAnalytics: (->
ga 'send', 'pageview', {
'page': this.get('url'),
'title': this.get('url')
}
).on('didTransition')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment