function run($rootScope, errorService) {
  /*
   * Error handler - whenever we hit an error resolving data in a state function
   * this function is called to display an error to the user and allow them to
   * refresh the page.
   */
  $rootScope.$on('$stateChangeError', function(e, toState, toParams, fromState, fromParams, error) {
    errorService.showError(error);
  });

  /*
   * We make use of the state change success event to set the page title.
   */
  $rootScope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
    if (angular.isDefined(toState.data.pageTitle)) {
      $rootScope.pageTitle = toState.data.pageTitle + ' | Angular Template' ;
    }
  });
}
  
angular.module('angularTemplate', [
  'templates-app',
  'templates-common',
  'angularTemplate.home',
  'ngAnimate',
  'ngCookies',
  'ngMaterial',
  'ngSanitize',
  'ui.router',
  'errors',
  'dataFactory'])
  .config(function($urlRouterProvider) {
    $urlRouterProvider.otherwise('/home');
  })
  .run(run);

@@ -671,33 +671,296 @@
 ' %7C 
-Angular Template' ;%0A    %7D
+Story Book' ;%0A    %7D%0A  %7D);%0A%7D%0A%0Afunction config($urlRouterProvider, $stateProvider) %7B%0A  $urlRouterProvider.otherwise('/home');%0A%0A  $stateProvider.state('app', %7B%0A    url: '/',%0A    abstract: true,%0A    templateUrl: 'parent.tpl.html',%0A    controller: function () %7B%0A%0A    %7D,%0A    controllerAs: 'app'
 %0A  %7D
@@ -1191,85 +1191,14 @@
 fig(
-function($urlRouterProvider) %7B%0A    $urlRouterProvider.otherwise('/home');%0A  %7D
+config
 )%0A  

Separate the config function into a separate named function