How to attach a json file to the .js file

I want to connect the ,json file with a .js file in my ionic 2 project and show the data using the .html.(using ngFor)
Please tell me the syntax for that.

you should use Http, HTTP_PROVIDERS provider from angular2.

1 Like

Thanks Sir…:smiley:
can you tell me from where to import http_providers in ionic 2 …is it same as the example in the link?

can you please provide a simple code snipett in which we get data from json file and show them using .html
please it will be a great help sir.

exports.config = {
    data: {
        "name": "aaron"

in code

var config = require('./data/something')