config.lazyload.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. // lazyload config
  2. angular.module('app')
  3. /**
  4. * jQuery plugin config use ui-jq directive , config the js and css files that required
  5. * key: function name of the jQuery plugin
  6. * value: array of the css js file located
  7. */
  8. .constant('JQ_CONFIG', {
  9. }
  10. )
  11. // oclazyload config
  12. .config(['$ocLazyLoadProvider', function ($ocLazyLoadProvider) {
  13. // We configure ocLazyLoad to use the lib script.js as the async loader
  14. $ocLazyLoadProvider.config({
  15. debug: false,
  16. events: true,
  17. modules: [
  18. {
  19. name: 'ui.bootstrap.datetimepicker',
  20. files: [
  21. //npm上面没有min版本,1.1.4也是angular1.X的最后一个适配版本; js内部引用了相对路径的templates/datetimepicker.html,所以必须复制到本工程;todo 垃圾控件,不能用在administrator和admaster ,因为本路径下没有datetimepicker.html 可能报404
  22. 'https://cdn.washpayer.com/npm/angular-bootstrap-datetimepicker@1.1.4/src/css/datetimepicker.css',
  23. 'https://cdn.washpayer.com/npm/angular-bootstrap-datetimepicker@1.1.4/src/js/datetimepicker.js',
  24. 'https://cdn.washpayer.com/npm/angular-bootstrap-datetimepicker@1.1.4/src/js/datetimepicker.templates.js'
  25. ]
  26. },
  27. {
  28. name: 'textAngular',// todo 暂时不兼容,似乎不能通过懒加载(本地vendor版本似乎也有问题 因为我们升级了angular),如果使用script加载,又不兼容angular1.7的toLowerCase函数
  29. files: [
  30. 'https://cdn.washpayer.com/npm/textangular@1.5.16/dist/textAngular-rangy.min.js',
  31. 'https://cdn.washpayer.com/npm/textangular@1.5.16/dist/textAngular-sanitize.min.js',
  32. 'https://cdn.washpayer.com/npm/textangular@1.5.16/dist/textAngular.min.js',
  33. ]
  34. },
  35. {
  36. name: 'ui.select',
  37. files: [
  38. // 0.20.0版本适应了angular1.3x,1.5x 等,低版本的select 只能用于低版本的angular;版本似乎已经停止维护(angular-ui-select不再使用);
  39. 'https://cdn.washpayer.com/npm/ui-select@0.20.0/dist/select.min.js',
  40. 'https://cdn.washpayer.com/npm/ui-select@0.20.0/dist/select.min.css',
  41. ]
  42. },
  43. {
  44. name: 'angularFileUpload',
  45. files: [
  46. 'https://cdn.washpayer.com/npm/angular-file-upload@2.5.0/dist/angular-file-upload.min.js'
  47. ]
  48. },
  49. ]
  50. });
  51. }])
  52. ;