From de7c6bce2cf6c9d271b2ccc23a2872a4bcff6bc5 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Mon, 28 Apr 2014 23:51:53 -0400 Subject: [PATCH] Do not use tag for none or hash. --- blueprint/app/router.js | 2 +- blueprint/config/environment.js | 1 + lib/broccoli/ember-app.js | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/blueprint/app/router.js b/blueprint/app/router.js index 5a0f39502b..33b98e3d7c 100644 --- a/blueprint/app/router.js +++ b/blueprint/app/router.js @@ -1,5 +1,5 @@ var Router = Ember.Router.extend({ - location: 'auto' + location: ENV.locationType }); Router.map(function() { diff --git a/blueprint/config/environment.js b/blueprint/config/environment.js index e810d0517d..8651dd127e 100644 --- a/blueprint/config/environment.js +++ b/blueprint/config/environment.js @@ -1,6 +1,7 @@ module.exports = function(environment) { var ENV = { baseURL: '/', + locationType: 'auto', FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true diff --git a/lib/broccoli/ember-app.js b/lib/broccoli/ember-app.js index 75774cf798..09c9c43040 100644 --- a/lib/broccoli/ember-app.js +++ b/lib/broccoli/ember-app.js @@ -223,7 +223,13 @@ function injectENVJson(fn, env, tree, files) { }; var baseTag = function(){ - var baseURL = fn(env).baseURL; + var env = fn(env); + var baseURL = env.baseURL; + var locationType = env.locationType; + + if (locationType === 'hash' || locationType === 'none') { + return ''; + } if (baseURL && baseURL !== '') { return '';