main.dev.ts 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Password Management Servlets (PWM)
  3. * http://www.pwm-project.org
  4. *
  5. * Copyright (c) 2006-2009 Novell, Inc.
  6. * Copyright (c) 2009-2021 The PWM Project
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. */
  20. import 'angular';
  21. import 'angular-translate';
  22. import '@microfocus/ng-ias/dist/ng-ias';
  23. import { bootstrap, module } from 'angular';
  24. import helpDeskModule from './helpdesk.module';
  25. import routes from './routes';
  26. import uiRouter from '@uirouter/angularjs';
  27. import PeopleService from '../../services/people.service.dev';
  28. import HelpDeskConfigService from '../../services/helpdesk-config.service.dev';
  29. import HelpDeskService from '../../services/helpdesk.service.dev';
  30. import PasswordService from '../../services/password.service.dev';
  31. import PwmService from '../../services/pwm.service.dev';
  32. module('app', [
  33. uiRouter,
  34. helpDeskModule,
  35. 'pascalprecht.translate',
  36. 'ng-ias'
  37. ])
  38. .config(['$translateProvider', ($translateProvider: angular.translate.ITranslateProvider) => {
  39. $translateProvider.translations('en', require('../../i18n/translations_en.json'));
  40. $translateProvider.useSanitizeValueStrategy('escapeParameters');
  41. $translateProvider.preferredLanguage('en');
  42. }])
  43. .config(routes)
  44. .service('HelpDeskService', HelpDeskService)
  45. .service('PasswordService', PasswordService)
  46. .service('PeopleService', PeopleService)
  47. .service('PwmService', PwmService)
  48. .service('ConfigService', HelpDeskConfigService);
  49. // Attach to the page document
  50. bootstrap(document, ['app']);