Commit | Line | Data |
---|---|---|
416abe87 | 1 | (function(angular, CRM) { |
a8e65974 TO |
2 | // crmApp is the default application which aggregates all known modules. |
3 | // crmApp should not provide any significant services, and no other | |
4 | // modules should depend on it. | |
416abe87 | 5 | var crmApp = angular.module('crmApp', CRM.angular.modules); |
7585cf5b CW |
6 | |
7 | // dev/core#1818 use angular 1.5 default of # instead of 1.6+ default of #! | |
8 | crmApp.config(['$locationProvider', function($locationProvider) { | |
9 | $locationProvider.hashPrefix(""); | |
10 | }]); | |
11 | ||
416abe87 PH |
12 | crmApp.config(['$routeProvider', |
13 | function($routeProvider) { | |
b20ea913 TO |
14 | |
15 | if (CRM.crmApp.defaultRoute) { | |
16 | $routeProvider.when('/', { | |
17 | template: '<div></div>', | |
18 | controller: function($location) { | |
19 | $location.path(CRM.crmApp.defaultRoute); | |
20 | } | |
21 | }); | |
22 | } | |
23 | ||
416abe87 PH |
24 | $routeProvider.otherwise({ |
25 | template: ts('Unknown path') | |
26 | }); | |
27 | } | |
28 | ]); | |
416abe87 | 29 | })(angular, CRM); |