Auto NInja Interview Question
Front-end Software EngineersCountry: India
Interview Type: Phone Interview
You can use services to organize and share code across your app.
eg: If you have great algorithm for multiplication of 2 numbers, you would define that algorithm as a service and call that service whenever you want to multiply 2 numbers.
One more example would be a login service. You have defined a login service which validates whether user is logged in or not, if not then redirect it to the login page. You will call this service in controllers rather than implementing same login functionality again and again.
Services are typically used to share the data withing the application in front end.
- shandi January 15, 2016Services bring data from the server end .
$http{method :GET , url: api key}