We will implement the third user story in this section, which is about displaying account information to the members of MyBank. The requirements for this story, as mandated by the client, are that the account information be displayed in a table under the accounts tab that we created earlier. The account information must include the name of the branch the account is held at, the account number, type of account, and the current account balance. The accounts in the table should also be numbered. The client has also stated that any amount figure displayed in the application should be in the currency format.
This story requires us to retrieve account information from the server side. To keep the implementation simple and to focus on the client-side development, a server stub is provided, which simulates the server interaction. Let's get started by including the stub in our application. Download the serverstub.js
file from chapter5\server
. Copy the file to the javascript
folder...