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

Migrate Angular functions to common library

Discussão em 'Angular' iniciado por tony, Outubro 17, 2024 às 07:13.

  1. tony

    tony Guest

    Our Angular project has evolved to have a bunch of functions that don't really belong in any class (in addition to all the normal classes of course). We now need a new Angular project that wants to also use some of these functions. These are all private and will never be in a public repo

    I've made a new project and am using it but all the imports look like

    import { func1 } from "common-library"

    i.e. there's no concept of a namespace here.

    How do I structure this such that I end up with something like

    import { func1 } from "common-library/functionset1"
    import { func1 } from "common-library/functionset2"


    And ditto for the classes. I want to to avoid the possibly of a class with a generic name like Item causing a conflict in the future

    Continue reading...

Compartilhe esta Página