configeditor.module.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Password Management Servlets (PWM)
  3. * http://www.pwm-project.org
  4. *
  5. * Copyright (c) 2006-2009 Novell, Inc.
  6. * Copyright (c) 2009-2020 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 'textangular';
  21. import 'textangular/dist/textAngular-sanitize';
  22. import * as angular from 'angular';
  23. import { module } from 'angular';
  24. import ConfigEditorController from './configeditor.controller';
  25. module('configeditor.module', ['textAngular'])
  26. .controller('ConfigEditorController', ConfigEditorController);
  27. // lowercase and uppercase have been removed from angular, but textAngular still hasn't caught up with the change. So
  28. // The following polyfills it for now:
  29. // @ts-ignore
  30. if (!angular.lowercase) angular.lowercase = (str) => str ? str.toLowerCase() : str;
  31. // @ts-ignore
  32. if (!angular.uppercase) angular.uppercase = (str) => str ? str.toUpperCase() : str;