[backport] allow decorators
parent
7c6e3ccfc8
commit
27802484e6
|
@ -503,6 +503,12 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven
|
||||||
$translateProvider.fallbackLanguage(preferedLangCode)
|
$translateProvider.fallbackLanguage(preferedLangCode)
|
||||||
|
|
||||||
|
|
||||||
|
# decoratos
|
||||||
|
decorators = _.where(@.taigaContribPlugins, {"type": "decorator"})
|
||||||
|
|
||||||
|
_.each decorators, (decorator) ->
|
||||||
|
$provide.decorator decorator.provider, decorator.decorator
|
||||||
|
|
||||||
i18nInit = (lang, $translate) ->
|
i18nInit = (lang, $translate) ->
|
||||||
# i18n - moment.js
|
# i18n - moment.js
|
||||||
moment.locale(lang)
|
moment.locale(lang)
|
||||||
|
@ -592,6 +598,8 @@ init = ($log, $rootscope, $auth, $events, $analytics, $translate, $location, $na
|
||||||
appMetaService.setAll(title, description)
|
appMetaService.setAll(title, description)
|
||||||
|
|
||||||
|
|
||||||
|
pluginsWithModule = _.filter(@.taigaContribPlugins, (plugin) -> plugin.module)
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
# Main Global Modules
|
# Main Global Modules
|
||||||
"taigaBase",
|
"taigaBase",
|
||||||
|
@ -636,7 +644,7 @@ modules = [
|
||||||
"pascalprecht.translate",
|
"pascalprecht.translate",
|
||||||
"infinite-scroll",
|
"infinite-scroll",
|
||||||
"tgRepeat"
|
"tgRepeat"
|
||||||
].concat(_.map(@.taigaContribPlugins, (plugin) -> plugin.module))
|
].concat(_.map(pluginsWithModule, (plugin) -> plugin.module))
|
||||||
|
|
||||||
# Main module definition
|
# Main module definition
|
||||||
module = angular.module("taiga", modules)
|
module = angular.module("taiga", modules)
|
||||||
|
|
Loading…
Reference in New Issue