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
For example I have two components which use same filter. It is not clear from the styleguide should I duplicate filter code in each module, or move filter to parent/root module? Or create something like common.module to keep reusable code?
From performance point of view keeping filters as separate files in common folder (not in common module) is better because filter will not be included in every bundle.
The text was updated successfully, but these errors were encountered:
@Aliaksandr-Padabed Agreed with you. I encounter the exact same situation with a shared filter and a shared service. For example, let's say I have a custom loggerService that I would like to use accross different components. The styleguide does not mention where to put it.
The styleguide considers an AngularJS application as a cluster of isolated components which can communicate with each other. But, it feels like it's missing a part about the application wide shared code .
Anyway, I ended up attaching my service and my filter to the app.components module like this:
For example I have two components which use same filter. It is not clear from the styleguide should I duplicate filter code in each module, or move filter to parent/root module? Or create something like common.module to keep reusable code?
From performance point of view keeping filters as separate files in common folder (not in common module) is better because filter will not be included in every bundle.
The text was updated successfully, but these errors were encountered: