Coder Social home page Coder Social logo

Comments (7)

rboughani avatar rboughani commented on July 18, 2024

this the error :

         Error: [ngRepeat:dupes] http://errors.angularjs.org/1.2.13/ngRepeat/dupes?        p0=item%20in%20toPrettyJSON(csv.result%2C%202)&p1=string%3A%20
         at Error (native)
at http://localhost/statics/jsext/angular.min.js:6:450
at http://localhost/statics/jsext/angular.min.js:186:445
at Object.fn (http://localhost/statics/jsext/angular.min.js:101:35)
at h.$digest (http://localhost/statics/jsext/angular.min.js:101:467)
at h.$apply (http://localhost/statics/jsext/angular.min.js:104:264)
at FileReader.d.onload (http://localhost/statics/templates/mgn/js/angular-csv-import.js:1:779)

from angular-csv-import.

rboughani avatar rboughani commented on July 18, 2024

personne ne maîtrise cette api

from angular-csv-import.

bahaaldine avatar bahaaldine commented on July 18, 2024

Hey Darkman, just calm down, I'll check your issue as soon as I have free time.
I have urgent business priorities there and I wasn't able to spend time on my github issues.

Take a breath, I'll be back soon.

from angular-csv-import.

rboughani avatar rboughani commented on July 18, 2024

okay, I'll wait, meanwhile I will continue with my code which is a mixture of jquery and angular
thx,

from angular-csv-import.

jackhickey avatar jackhickey commented on July 18, 2024

I removed JSON.stringify from line 89 and just return result and that seems to fix this issue.

from angular-csv-import.

troytreynolds avatar troytreynolds commented on July 18, 2024

Is there anyway that you can make that fix on bower? It is currently just one long string compared to being a JSON object. @jackhickey was right all that needed to be changed was the return in your directive. I ask due to me using your bower and don't want to do any alterations to your code after it is installed.

from angular-csv-import.

abkfenris avatar abkfenris commented on July 18, 2024

You can add a function to your controller, like the toPrettyJSON in the example.

Here's what I have

        $scope.reJSON = function (objStr) {
            //console.log("String:", objStr);
            var out = null;
            try {
                out = $parse(objStr)({});
            } catch(e) {

            }
            //console.log(out);
            return out;
        }

Then when I want to interact with it as JSON in the HTML

<tr ng-repeat="row in reJSON(csv.result) track by $index">

Then I don't need to modify the bower version.

from angular-csv-import.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.