Frontend views
Now let's start building the pending two sections of our frontend:
Movie listing and ticketing workflow:
Movies list with filter
Theaters list of selected movie
Book Tickets screen
Movie trailers
Configuration
Let's create the Web API URLs in our configuration.js
file so that we don't have to use hardcoded strings inside the application:
MovieTickets.configuration = (function () { var serviceUrl = "http://localhost/movietickets.webapi/api/"; return { serviceUrl: serviceUrl, accountUrl: serviceUrl + "Account/", getMovieListUrl: serviceUrl + "Movies/GetMovieList/", getTheaterListForMovieUrl: serviceUrl + "Theater/Get/", getTrailersUrl: serviceUrl + "Movies/GetTrailers/", purchaseTicketsUrl: serviceUrl + "Tickets" } })();
Tip
If you want to use the hosted service provided by us, you can replace the declaration of serviceUrl
with the application of the following code snippet:
var serviceUrl = "http:/...