How can I get the rootURL in App.Router in my controller to use in my JSON request?
If I specify a rootURL like this:
App.Router.reopen({
rootURL: '/site1/'
});
I want to be able to do something like this:
FooController = Ember.ObjectController.extend({
needs: ["application"],
actions: {
examine: function() {
var rootURL = this.get('controllers.application.router.rootURL');
$.getJSON(rootURL + "/examine/" + id).then(function(response) {
// do stuff with response
});
}
}
});