Skip to content

Commit

Permalink
Do not use <base> tag for none or hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
rwjblue committed Apr 29, 2014
1 parent 449ac70 commit de7c6bc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion blueprint/app/router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var Router = Ember.Router.extend({
location: 'auto'
location: ENV.locationType
});

Router.map(function() {
Expand Down
1 change: 1 addition & 0 deletions blueprint/config/environment.js
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 7 additions & 1 deletion lib/broccoli/ember-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<base href="' + baseURL + '" />';
Expand Down

0 comments on commit de7c6bc

Please sign in to comment.