How to do it...

  1. First, let's quickly create the fake backend server. You must install http-server for this:
$ sudo npm install -g http-server
  1. Create a folder to store your .json file. Let's call it MockRest, as shown:
$ mkdir MockRest
$ cd MockRest
  1. Create the test.json file and fill in the following content for the REST response:
[ { "title": "What a beautiful song", "category": "objects", "description": "Music is a moral law. It gives soul to the universe, wings to the mind, flight to the imagination, and charm and gaiety to life and to everything." }, { "title": "The world we live in", "category": "nature", "description": "Look deep into nature, and then you will understand everything better." }, { "title": "Life experiences", "category": ...

Get Ionic Cookbook - Third 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.