So far I’ve been copy-pasting common components between Apps, but it is time for a better way to do it.
I started off with symlinks, but they are hard to manage and Ionic doesn’t pick up on the changes so well so you end up restarting Ionic quite a lot so I abandoned this way.
I’m now using Git submodules. Even though I have to commit/push/pull to get stuff back and forth I think it works well.
I’m now looking into ngModule to group common components together to be reused. For example login/signup, settings, about, etc. It looks over-complicated to me but probably the way to do it.
Will it be possible to customize an imported ngModule to tailor to specifics of the App?
What do you do with the assets that belong to an ngModule? Say you have an “About” ngModule that has some logos and icons in it. Do I have to copy those manually to the App or is there a better way, like include them in the ngModule somehow?
Looking forward, what does it involve to create an NPM package so it can be published and used by other people? I suppose the components have to be compiled before packaging. And the same question about the assets apply to this as well. Seems like this is quite complicated. Is this even possible?
I like Ionic a lot, but from my point of view, Angular seems to over-complicate things. I wonder if that is really necessary. So far I’ve bit the bullet and gone on with the steep learning process to get simple things done. At this point I’m kind of hitting the wall.
What have you guys done and what works well for you?