[Tutorial] MySQLi-request - handling with Ionic/Angular

Hey guys,

I’m really new with Ionic/Angular. Before Ionic i have just used Framework7, this is more simple. :smile:

So for example currently i don’t really unterstand what the factory/service does and why i need a factory, when i also could load the JSON-data in the controller.

Do you know any good tutorial for me?

What i want to do?

  • load data from server on app-start
  • load dynamic data dependent on user (groups for user with ID = X; groupdetails for group with ID = XYZ)
  • insert data into database
  • store data in local.storage
  • update local.storage

Could anybody help me a little bit :smile:

Hey @Driesel

So why would you want to use a factory over a controller?
A controller is tied to a single view, so what if you have data that you want to use through out your entire app?

A factory allows you to create a global function that you can inject into your controllers and pass between them as your change views.

Essentially the questions you’re asking are specific to angular, so you should checkout some angular resources to get going.