restaurants.js

restaurants.js represents an Angular service for our application that we'll use for the restaurants. We know that there are two common uses of services—organizing code and sharing code across applications. Therefore, we have created a restaurants service that will be used among different modules such as search, list, details, and so on.

Services are singleton objects, which are lazily instantiated by the AngularJS service factory.

The following section initializes the restaurants service module and loads the required dependencies:

angular.module('otrsApp.restaurants', [ 
    'ui.router', 
    'ui.bootstrap', 
    'ngStorage', 
    'ngResource' 
]) 

In the configuration, we are defining the routes and state of the otrsApp.restaurants module using ...

Get Mastering Microservices with Java 9 - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.