redirect from hashbang urls

This commit is contained in:
Sven Fuchs 2012-09-28 12:13:19 +02:00
parent 15d7406d71
commit 580d78e947
2 changed files with 6 additions and 1 deletions

View File

@ -39,6 +39,8 @@ require 'ext/ember/namespace'
callback()
run: (attrs) ->
@redirectOnHashbang()
console.log "Connecting to #{Travis.config.api_endpoint}"
app = Travis.App.create(attrs || {})
# TODO: router expects the classes for controllers on main namespace, so
@ -51,3 +53,6 @@ require 'ext/ember/namespace'
@store = app.store
app.initialize()
redirectOnHashbang: ->
location.href = location.href.replace('#!/', '') if location.hash.slice(0, 2) == '#!'

File diff suppressed because one or more lines are too long