Custom Watch Http Back
Logo image

Create Custom Service


In Angularjs, controllers handles the user interface behaviors while services are functions that consist the main logic that can be used by multiple controllers.

Below you will create a simple service in app.service() that multiply 2 numbers & injecting the service into a controller app.controller().


Copy the code below & save file as angularjs.html: