main.dev.ts 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * Password Management Servlets (PWM)
  3. * http://www.pwm-project.org
  4. *
  5. * Copyright (c) 2006-2009 Novell, Inc.
  6. * Copyright (c) 2009-2018 The PWM Project
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. import { bootstrap, module } from 'angular';
  23. import ConfigService from './services/peoplesearch-config.service.dev';
  24. import peopleSearchModule from './peoplesearch/peoplesearch.module';
  25. import PeopleService from './services/people.service.dev';
  26. import PwmService from './services/pwm.service.dev';
  27. import routes from './routes';
  28. import routeErrorHandler from './route-error-handler';
  29. import uiRouter from '@uirouter/angularjs';
  30. module('app', [
  31. uiRouter,
  32. peopleSearchModule,
  33. 'pascalprecht.translate',
  34. 'ng-ias'
  35. ])
  36. .config(routes)
  37. .config(['$translateProvider', ($translateProvider: angular.translate.ITranslateProvider) => {
  38. $translateProvider.translations('en', require('i18n/translations_en.json'));
  39. $translateProvider.useSanitizeValueStrategy('escapeParameters');
  40. $translateProvider.preferredLanguage('en');
  41. }])
  42. .run(routeErrorHandler)
  43. .service('PeopleService', PeopleService)
  44. .service('PwmService', PwmService)
  45. .service('ConfigService', ConfigService);
  46. // Attach to the page document
  47. bootstrap(document, ['app']);