()
| 604 | } |
| 605 | |
| 606 | initialize () { |
| 607 | // http://nerds.airbnb.com/how-to-add-google-analytics-page-tracking-to-57536 |
| 608 | this.bind('route', this._trackPageView) |
| 609 | Backbone.Mediator.subscribe('router:navigate', this.onNavigate, this) |
| 610 | this.initializeSocialMediaServices = _.once(this.initializeSocialMediaServices) |
| 611 | |
| 612 | // Lazily require and load VueRouter because it currently loads all of its dependencies |
| 613 | // in a single Webpack bundle. The app initialization logic assumes that all Views are |
| 614 | // loaded lazily and thus will not be initialized as part of the initial page load. |
| 615 | // |
| 616 | // Because Vue router and its dependencies are loaded in a single bundle any CocoViews |
| 617 | // that are loaded via the Vue router are initialized too early. Delaying loading of |
| 618 | // Vue router delays initialization of dependent CocoViews until an appropriate time. |
| 619 | // |
| 620 | // TODO Integrate webpack bundle loading with vueRouter and load this normally |
| 621 | this.vueRouter = require('app/core/vueRouter').default() |
| 622 | } |
| 623 | |
| 624 | routeToServer (e) { |
| 625 | window.location.href = window.location.href // eslint-disable-line no-self-assign |
no test coverage detected