diff options
Diffstat (limited to 'www/crm/wp-content/plugins/civicrm/civicrm/ang/crmApp.js')
-rw-r--r-- | www/crm/wp-content/plugins/civicrm/civicrm/ang/crmApp.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmApp.js b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmApp.js new file mode 100644 index 00000000..c7bb81e2 --- /dev/null +++ b/www/crm/wp-content/plugins/civicrm/civicrm/ang/crmApp.js @@ -0,0 +1,23 @@ +(function(angular, CRM) { + // crmApp is the default application which aggregates all known modules. + // crmApp should not provide any significant services, and no other + // modules should depend on it. + var crmApp = angular.module('crmApp', CRM.angular.modules); + crmApp.config(['$routeProvider', + function($routeProvider) { + + if (CRM.crmApp.defaultRoute) { + $routeProvider.when('/', { + template: '<div></div>', + controller: function($location) { + $location.path(CRM.crmApp.defaultRoute); + } + }); + } + + $routeProvider.otherwise({ + template: ts('Unknown path') + }); + } + ]); +})(angular, CRM); |