When to Use Providers/Services/Injectables in Ionic



By Josh Morony

A concept you will quickly come to terms with in Ionic is the concept of a page. A page is just a normal Angular component that we use to display a particular page in our application. We might have a page for displaying a list of users, and so we have a component called UserListPage that we use for that task – easy enough to understand.


What might not be so obvious is the role of Providers, Services, or Injectables in Ionic. The first thing to clear up is that Providers, Services, and Injectables all reference the same thing, they are classes in our applications that are decorated with the @Injectable decorator:

Read the full article...

Share on Google Plus

About www. codeandyou.com

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment