require('./css/main.css');
require('babel-polyfill');

var angular = require('angular');

angular.module('app', [require('angular-sanitize'), require('angular-route'), require('angular-ui-bootstrap'), require('angular-translate'), require('angular-translate-loader-static-files')]).config(function($routeProvider, $translateProvider) {

  $translateProvider.useSanitizeValueStrategy('sanitize');
  // Bake in 'en' using webpack
  $translateProvider.translations('en', require('json-loader!../www/translations/locale-en.json'));
  // For everything else, go to the static files loader
  $translateProvider.useStaticFilesLoader({
    prefix: 'translations/locale-',
    suffix: '.json'
  });
  $translateProvider.preferredLanguage('en');

  $routeProvider.when('/version/draft-05/markup/:markupLanguage', {
    redirectTo: function(params) {
      return '/version/v5-unofficial/markup/' + params.markupLanguage;
    }
  });
  $routeProvider.when('/version/:specVersion/markup/:markupLanguage', {
    template: '<validator-view></validator-view>'
  });
  $routeProvider.otherwise({
    redirectTo: '/version/draft-04/markup/json'
  });

}).run(function($rootScope, $location, $window, $log) {
  $rootScope.$on('$routeChangeSuccess', function() {
    $log.info('Hash change, informing GA');
    // https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications
    $window.ga('set', 'page', $location.path());
  });
});

require('./services');
require('./components');

require('./css/main.css');
require('babel-polyfill');

var angular = require('angular');

angular.module('app', [require('angular-sanitize'), require('angular-route'), require('angular-ui-bootstrap'), require('angular-translate'), require('angular-translate-loader-static-files')]).config(function($routeProvider, $translateProvider) {

  $translateProvider.useSanitizeValueStrategy('sanitize');
  // Bake in 'en' using webpack
  $translateProvider.translations('en', require('json-loader!../www/translations/locale-en.json'));
  // For everything else, go to the static files loader
  $translateProvider.useStaticFilesLoader({
    prefix: 'translations/locale-',
    suffix: '.json'
  });
  $translateProvider.preferredLanguage('en');

  $routeProvider.when('/version/draft-05/markup/:markupLanguage', {
    redirectTo: function(params) {
      return '/version/v5-unofficial/markup/' + params.markupLanguage;
    }
  });
  $routeProvider.when('/version/:specVersion/markup/:markupLanguage', {
    template: '<validator-view></validator-view>'
  });
  $routeProvider.otherwise({
    redirectTo: '/version/draft-04/markup/json'
  });

}).run(function($rootScope, $location, $window, $log) {
  $rootScope.$on('$routeChangeSuccess', function() {
    $log.info('Hash change, informing GA');
    $window.ga('send', 'pageview', $location.path());
  });
});

require('./services');
require('./components');

Revert pageview logic, as behaviour flow was no longer visible
Revert pageview logic, as behaviour flow was no longer visible
