simplify the method of using provider
Now,to realize the provider,3 steps needed:
1\declare the injectable service:
2\give it as a argument of AppFactory:
3\use really the provider:
that is complex.why need to use the decorator '@injectable'? why need to register provider to AppFactory?it is confused.
@ockan @Injectable is used to define the lifetime scope of the provider object.
If you don't use @Injectable, and you register the service on the AppFactory or Module the application will assume the provider as a singleton scope.
Also, providers in AppFactory or `Module' are registered in the Ellar DI container making them available for injection.
But @ockan, if you feel there are other ways this could be made easy, please share, I would love to hear your suggestion.