Issue
Adding several unused types to the directives property of the Component decorator in Angular2 is the same as adding the correct directives?
I mean, is the compiler smart enough to output the exact same result within the JS file?
EDIT:
I made a tiny test. I added a COMMON_DIRECTIVES and some of my own directives to a component that didn’t use all of them. Got both js and used FileMerge to compare. Both are equal. But I will leave this open, maybe someone has more to add.
Solution
I have a longer engineering-centric answer here:
https://gist.github.com/matanlurey/0fec1ac15a7a80c898870546123b70b3
tl;dr, as filiph mentioned, we are very conservative. We are looking to address this in a future version of AngularDart, but it will likely be a breaking change.
Answered By – matanlurey
Answer Checked By – Terry (FlutterFixes Volunteer)