code: function(router) {
      var location = get(router, 'location'),
          rootElement = get(this, 'rootElement'),
          applicationController = get(router, 'applicationController');
  
      Ember.assert("ApplicationView and ApplicationController must be defined on your application", (this.ApplicationView && applicationController) );
  
      var applicationView = this.ApplicationView.create({
        controller: applicationController
      });
      this._createdApplicationView = applicationView;
  
      applicationView.appendTo(rootElement);
  
      router.route(location.getURL());
      location.onUpdateURL(function(url) {
        router.route(url);
      });
    }
docs: @private
  
  If the application has a router, use it to route to the current URL, and
  trigger a new call to `route` whenever the URL changes.