Skip to content

Instantly share code, notes, and snippets.

@trabus
Last active August 29, 2015 13:57
Show Gist options
  • Select an option

  • Save trabus/9690173 to your computer and use it in GitHub Desktop.

Select an option

Save trabus/9690173 to your computer and use it in GitHub Desktop.
define(
['ember', 'app'],
function(Em, App){
/*
Mobile template resolver (borrowed from Discourse)
If the app is in mobile mode, it will look for a mobile template instead
*/
App.Resolver = Em.DefaultResolver.extend({
resolveTemplate: function(parsedName){
var t = this._super();
if(App.mobileActive){
return this._super('mobile_' + parsedName) || t;
}
return t;
}
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment