You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I had a request for directive aliases, for example:
shared.js
export SHARED_DEPS = [Dep1, Dep2, Dep3];
component1.js
import {SHARED_DEPS} from 'shared.js';
@Component({...})
@View({directives: SHARED_DEPS})
class Component1 {...}
component2.js
import {SHARED_DEPS} from 'shared.js';
import {AdditionalDep} from 'component2_deps.js';
@Component({...})
@View({directives: [SHARED_DEPS, AdditionalDep]})
class Component2 {...}
Component1 would depend on Dep1, Dep2, and Dep3, while Component2 would be those as well as AdditionalDep.
This should already be supported in reflective mode. There's a bit of a debate going about the directives field. Not 100% sure directives are here to stay. Let's wait until the dust settles on the topic.
Activity
yjbanov commentedon May 10, 2015
This should already be supported in reflective mode. There's a bit of a debate going about the
directivesfield. Not 100% suredirectivesare here to stay. Let's wait until the dust settles on the topic.pkozlowski-opensource commentedon May 10, 2015
Right, currently there is logic to flatten directives list:
angular/modules/angular2/src/core/compiler/compiler.js
Line 241 in 28022f4
mhevery commentedon Jun 1, 2015
Obsolete. Already supported.
kegluneq commentedon Jun 2, 2015
Not yet supported when running statically in the transformer.
kegluneq commentedon Jul 14, 2015
/cc @sigmundch
8 remaining items
sigmundch commentedon Jul 21, 2015
will do, thanks!
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.