1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Overriding components/pipes/services and directives globally in Angular

Discussão em 'Angular' iniciado por Chocho, Setembro 10, 2024.

  1. Chocho

    Chocho Guest

    I'm trying to solve three scenarios but don't know how to do it. I have a remote repo with the code commonly used in projects. Inside, I have components (buttons, footer, content section), directives(like scrollbar), pipes, and services. I have registered them globally in my current project.

    My problems are:

    1. How can I replace them with my custom solution without touching the remote? I mean, If I change - for instance - the button or scrollbar, and then I use the content section from the remote, I expect to see my custom scrollbar/button inside, instead of the original one.
    2. Is there a way to replace the implementation of pipes globally? (the same way as you can replace services via provide and use class in the app module)
    3. If we move to the standalone components will I be able to change the component which is visible under the specified selector in existing and non-touchable components? I'm asking about the scenario, where I have an app-button and I want to replace it globally with my custom-made app-button.

    How can I do that?

    Continue reading...

Compartilhe esta Página