(function () { 'use strict'; var streamApp = angular.module('streamApp', ['ngTouch', 'angularFileUpload', 'ngRoute', 'ngSanitize']); Config.$inject = ['$routeProvider', '$locationProvider', '$provide']; function Config($routeProvider, $locationProvider, $provide) { $provide.decorator("$exceptionHandler", function ($delegate, $injector) { return function (exception, cause) { var $rootScope = $injector.get("$rootScope"); //$rootScope.addError({ message: "Exception", reason: exception }); $delegate(exception, cause); }; }); $routeProvider .when('/', { templateUrl: 'App/components/stream/stream.html?v=6.0.0c', controller: 'streamController', resolve: { } }) .when('/account', { templateUrl: 'App/components/account/account.html?v=6.0.0c', controller: 'accountController' }) .when('/sharing', { templateUrl: 'App/components/sharing/sharing.html?v=6.0.0c', controller: 'sharingController' }) .when('/how', { templateUrl: 'App/components/how/how.html?v=6.0.0c', controller: 'howController' }) .when('/groups', { templateUrl: 'App/components/groups/groups.html?v=6.0.0c', controller: 'groupsController' }) .when('/login', { templateUrl: 'App/components/login/login.html?v=6.0.0c', controller: 'loginController' }) .when('/register', { templateUrl: 'App/components/register/register.html?v=6.0.0c', controller: 'registerController' }) .when('/forgotPassword', { templateUrl: 'App/components/forgotPassword/forgotPassword.html?v=6.0.0c', controller: 'forgotPasswordController' }) .when('/resetPassword', { templateUrl: 'App/components/resetPassword/resetPassword.html?v=6.0.0c', controller: 'resetPasswordController' }) .when('/updatePassword', { templateUrl: 'App/components/updatePassword/updatePassword.html?v=6.0.0c', controller: 'updatePasswordController' }) .when('/sharingRequest', { templateUrl: 'App/components/sharingRequest/sharingRequest.html?v=6.0.0c', controller: 'sharingRequestController' }) .when('/memory', { templateUrl: 'App/components/drop/drop.html?v=6.0.0c', controller: 'dropController' }).when('/memory/add', { templateUrl: 'App/components/memory/memoryAdd.html?v=6.0.0c', controller: 'memoryAddController' }) .when('/termsOfService', { templateUrl: 'App/components/termsOfService/termsOfService.html?v=6.0.0c', controller: 'termsOfServiceController' }).when('/suggestions', { templateUrl: 'App/components/suggestions/suggestions.html?v=6.0.0c', controller: 'suggestionsController' }).when('/emailSubscription', { templateUrl: 'App/components/emailSubscription/emailSubscription.html?v=6.0.0c', controller: 'emailSubscriptionController' }).when('/contact', { templateUrl: 'App/components/contact/contact.html?v=6.0.0c', controller: 'contactController' }).when('/upgrade', { templateUrl: 'App/components/upgrade/upgrade.html?v=6.0.0c', controller: 'upgradeController' }).when('/albums', { templateUrl: 'App/components/album/albums.html?v=6.0.0c', controller: 'albumsController' }).when('/album/:id', { templateUrl: 'App/components/album/album.html?v=6.0.0c', controller: 'albumController' }).when('/start', { templateUrl: 'App/components/start/start.html?v=6.0.0c', controller: 'startController' }).when('/startTrial', { templateUrl: 'App/components/start/start.html?v=6.0.0c', controller: 'startController' }).when('/welcome', { templateUrl: 'App/components/welcome/welcome.html?v=6.0.0c', controller: 'welcomeController' }).when('/question/add', { templateUrl: 'App/components/question/questionAdd.html?v=6.0.0c', controller: 'questionAddController' }).when('/question/:id/ask', { templateUrl: 'App/components/question/questionAsk.html?v=6.0.0c', controller: 'questionAskController' }).when('/question/:id/asked', { templateUrl: 'App/components/question/questionAsked.html?v=6.0.0c', controller: 'questionAskedController' }).when('/question/:id/edit', { templateUrl: 'App/components/question/questionEdit.html?v=6.0.0c', controller: 'questionEditController' }).when('/questions', { templateUrl: 'App/components/question/questions.html?v=6.0.0c', controller: 'questionsController' }).when('/gettingStarted', { templateUrl: 'App/components/onboardPaid/gettingStarted.html?v=6.0.0c', controller: 'gettingStartedController' }).when('/gettingstarted', { templateUrl: 'App/components/onboarding/explanationB.html?v=6.0.0c', controller: 'explanationBController' }).when('/storylines/add/:first', { templateUrl: 'App/components/onboarding/timelineAdd.html?v=6.0.0c', controller: 'timelineAddFirstController' }).when('/storylines/:id/questions/:first', { templateUrl: 'App/components/timelines/timelineQuestion.html?v=6.0.0c', controller: 'timelineQuestionController' }).when('/storylines/:id/memories/first', { templateUrl: 'App/components/onboarding/selectMemory.html?v=6.0.0c', controller: 'selectMemoryController' }).when('/storylines/:id/memories/add', { templateUrl: 'App/components/onboarding/firstMemory.html?v=6.0.0c', controller: 'firstMemoryOnboardingController' }).when('/nextSteps/:id', { templateUrl: 'App/components/onboarding/nextSteps.html?v=6.0.0c', controller: 'nextStepsController' }).when('/storylines/:id/invitations/:first', { templateUrl: 'App/components/timelines/timelineInvitations.html?v=6.0.0c', controller: 'timelineInvitationsController' }).when('/memory/:id/first', { templateUrl: 'App/components/onboard/firstMemory.html?v=6.0.0c', controller: 'firstMemoryController' }).when('/question/first', { templateUrl: 'App/components/onboard/questionFirst.html?v=6.0.0c', controller: 'questionFirstController' }).when('/question/:id/first', { templateUrl: 'App/components/onboard/questionFirstAsk.html?v=6.0.0c', controller: 'questionFirstAskController' }).when('/congratulations', { templateUrl: 'App/components/onboard/congratulations.html?v=6.0.0c', controller: 'congratulationsController' }).when('/relationships', { templateUrl: 'App/components/onboard/relationships.html?v=6.0.0c', controller: 'relationshipsController' }).when('/timelines', { templateUrl: 'App/components/timelines/timelines.html?v=6.0.0c', controller: 'timelinesController' }).when('/timelines/add', { templateUrl: 'App/components/timelines/timelineAdd.html?v=6.0.0c', controller: 'timelineAddController' }).when('/timelines/:id/edit', { templateUrl: 'App/components/timelines/timelineEdit.html?v=6.0.0c', controller: 'timelineEditController' }).when('/timelines/:id/questions', { templateUrl: 'App/components/timelines/timelineQuestion.html?v=6.0.0c', controller: 'timelineQuestionController' }).when('/timelines/:id/invitations', { templateUrl: 'App/components/timelines/timelineInvitations.html?v=6.0.0c', controller: 'timelineInvitationsController' }).when('/timelines/:id', { templateUrl: 'App/components/timelines/timeline.html?v=6.0.0c', controller: 'timelineController' }).when('/plan', { templateUrl: 'App/components/account/plan.html?v=6.0.0c', controller: 'planController' }).when('/invite', { templateUrl: 'App/components/onboardPaid/invitations.html?v=6.0.0c', controller: 'invitationsController' }).when('/links', { templateUrl: 'App/components/links/links.html?v=6.0.0c', controller: 'linksController' }); } streamApp.config(Config); Run.$inject = ['$rootScope', '$window', '$location']; function Run($rootScope, $window, $location) { $rootScope.$on("$routeChangeStart", function (event, next, current) { $('#nav-bar').collapse('hide'); let title = $location.url(); let url = '/app' + $location.url(); $window.gtag('config', 'UA-109066993-2', { 'page_title': title, 'page_path': url }); }); } streamApp.run(Run); })();