angular - Ionic2+ Application -


i'm bit confused application instantiation hierarchy providers. following in app.module.ts import { myservice} '../providers/myservice/myservice';

and add @ngmodule collection providers:[ bla bla, myservice ]

now if import , instantiate myservice in app.components.ts make singleton whole app?

every time have wanted use in page have done import , page constructor thing (e.g. myserv: myservice)...but create new instance or use 1 created app.components.ts.

i love explanation of life-cycle of components know i'm doing (well, best possible!!)

injected services in ionic2+ indeed singletons , ionic instantiate , configure them during framework initialization.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -