JavaScript Retrieve a downloaded JSON file from a client device angularjs

I am building an offline functionality for a Cordova app that I am developing and I have a php file that gets only the list of images and I have taken the JSON from it and saved in the client device through FILESYSYTEM API and when I tried to retrieve it using angularjs, I couldn't display the images, even though I can see the container of every one of the images. Do I have to parse it so that it an be displayed or what am I missing ?

{ $http({
        method: 'POST', // I have used the GET method as well
        url: 'cdvfile://localhost/persistent/local_store/json1.json'
    }).success(function(data){
        $scope.clientData = data;
    });
}

and here is how it is that I am trying to display it

{<img class="image_dir" ng-src="cdvfile://localhost/persistent/local_store/{{image.image_dir}}">
}

Thanks in advance

Answer:1

I'm working on a project, and we use a lot of coding languages for different parts. I've tried to simplify the problem as much as I can, and came up with the following JSfiddle. The problem is, I ...

I'm working on a project, and we use a lot of coding languages for different parts. I've tried to simplify the problem as much as I can, and came up with the following JSfiddle. The problem is, I ...

  1. passing json string as query parameter
  2. passing json string to restful web service
  3. passing json string in url
  4. passing json string to mvc controller
  5. passing json string to spring mvc controller
  6. passing json string to javascript function
  7. passing json string as parameter to webmethod
  8. passing json string to render_template in flask
  9. passing json string to jsp
  10. passing json string
  11. passing json string in java
  12. send json string in post request
  13. send json string in post request c#
  14. send json string in get request
  15. send json string in postman
  16. send json string in post request java
  17. send json string in post request javascript
  18. send json string
  19. send json string ajax jquery
  20. send json string in post request postman

I'm working on my first GatsbyJS project (and hosted on Netlify) and over the past few weeks have noticed that everything is very speedy during development, but when built and hosted the pages are ...

I'm working on my first GatsbyJS project (and hosted on Netlify) and over the past few weeks have noticed that everything is very speedy during development, but when built and hosted the pages are ...

here i didn't understand what happen when i use var before variable in function it give me different out put and with out using var also i got a different output here is a code that you can easily ...

here i didn't understand what happen when i use var before variable in function it give me different out put and with out using var also i got a different output here is a code that you can easily ...

  1. explain value chain analysis
  2. explain value
  3. explain value added tax
  4. explain value chain
  5. explain value education
  6. explain value engineering with examples
  7. explain value of biodiversity
  8. explain value chain model
  9. explain value analysis
  10. explain value for money
  11. explain value engineering
  12. explain value proposition
  13. explain value added method
  14. explain value stream mapping
  15. explain value addition
  16. explain value at risk
  17. explain value chain analysis with example
  18. explain value based pricing
  19. explain value of information
  20. explain value and address operator in c

I am trying to use velocity together with jQuery (only for IE8 support) in an ES6 module. Consider this code: import { Component } from 'react'; import ReactDOM from 'react-dom'; import jquery from '...

I am trying to use velocity together with jQuery (only for IE8 support) in an ES6 module. Consider this code: import { Component } from 'react'; import ReactDOM from 'react-dom'; import jquery from '...

  1. using velocity to find acceleration
  2. using velocity to find force
  3. using velocity in a sentence
  4. using velocity in unity
  5. using velocity to find angle
  6. using velocity in javascript
  7. using velocity to find drag
  8. using velocity in python
  9. using velocity to find energy
  10. using velocity in angular
  11. using velocity points with singapore airlines
  12. using velocity points with etihad