Question: Source in JavaScript Files If you have not already created the following files do so now and source them into the web page within the

Source in JavaScript Files
If you have not already created the following files do so now and source them into the web page within the head tag.
peopleService.js
The service file should contain an object called peopleService
endPoint The peopleService object should have a property called endPoint.
The peopleService.getPage function as a service funciton
The peopleService.getPage function should have 2 parameters.
The peopleService.getPage should return the axios Promise object.
The function should be configured per the help documents for the endpoint.
The parameters to the getPage function should be pageIndex and pageSize
Functions Used in Rendering People
Create an declared function called getTemplate. This function: `
Should get the html from a template created by you and return it as a JQuery object.
Create an arrow function called renderPeople. This function will be used to render an array of people to the page.
You can create the function now and fill in the body at a later step.
The function should contain a parameter named people.
Create an arrow function called onGetPeopleSuccess that will be used as the success handler for your ajax call
The function onGetPeopleSuccess should have parameter named response
Create an arrow function called onGetPeopleErrorthat will be used as the error handler for your ajax call
The function onGetPeopleError should have parameter named err
The function onGetPeopleError should console.error the parameter passed to it.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!