Configure location properly
This commit is contained in:
parent
3d216ad9f7
commit
59477e5eac
|
@ -1,9 +1,10 @@
|
||||||
`import Ember from 'ember'`
|
`import Ember from 'ember'`
|
||||||
`import config from './config/environment'`
|
`import config from './config/environment'`
|
||||||
|
`import Location from 'travis/utils/location'`
|
||||||
|
|
||||||
Router = Ember.Router.extend
|
Router = Ember.Router.extend
|
||||||
# TODO: we should use TravisLocation here
|
# TODO: we should use TravisLocation here
|
||||||
location: 'history'
|
location: if Ember.testing then 'none' else Location
|
||||||
|
|
||||||
handleURL: (url) ->
|
handleURL: (url) ->
|
||||||
url = url.replace(/#.*?$/, '')
|
url = url.replace(/#.*?$/, '')
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
`import Ember from 'ember'`
|
||||||
|
|
||||||
Location = Ember.HistoryLocation.extend
|
Location = Ember.HistoryLocation.extend
|
||||||
getURL: ->
|
getURL: ->
|
||||||
location = @get('location')
|
location = @get('location')
|
||||||
location.pathname + location.hash
|
location.pathname + location.hash
|
||||||
|
|
||||||
|
`export default Location`
|
||||||
|
|
Loading…
Reference in New Issue
Block a user