Comments (14)
add this into ur controller.
$scope.csv = {
content: null,
header: true,
headerVisible: true,
separator: ',',
separatorVisible: true,
result: null,
encoding: 'ISO-8859-1',
encodingVisible: true,
accept: true,
callback: 'csvCallback'
};
$scope.csvCallback = function (result) {
// alert($scope.res)
}
In ur html it should be like this
from angular-csv-import.
The value has to be a variable and not just a value like so callback="callbackvariable" and not callback="callbackfunction()"
The callback would be a variable in the scope assigned to a function
function callback function(){
//do stuff here
}
$scope.callbackvariable = callbackfuntion;
from angular-csv-import.
Apologies, this doesn't work, it doesn't resolve scope changes
from angular-csv-import.
Hello, I'm facing the same issue with integration of this component , I'm running the code from the example in main.js file in this repo.
The error occurs when I import a file within my node app code, the scope is loaded with results correctly, but the console logs the TypeError: scope.callback is not a function at angular-csv-import: 68
I'm wondering whats wrong with my integration, because I can't fix the entire code of the module.
from angular-csv-import.
+1
Running angular.js 1.5.8 and getting TypeError: scope.callback is not a function
from angular-csv-import.
+1 Running angular.js 1.5.8 and getting TypeError : scope.callback is not a function
from angular-csv-import.
can anybody resolve this error
from angular-csv-import.
Same error here with Angular 1.4.0
from angular-csv-import.
To Fix, this issue finds the instructions below.
in your HTML
In Controller
$scope.csvCallback = function (result) {
// alert("define anything")
}
from angular-csv-import.
not working
from angular-csv-import.
In the definition of the directive the callback attribute is using = for bidirectional binding; It should probably use & to bind to an expression. This would allow the use of the callback similar to ngChange or ngClick.
from angular-csv-import.
Calback is simply not doing anything...
@nainyshah Do you have working example?
from angular-csv-import.
@srokatonie This code is copied from the project I am working on .......and it works perfectly.
from angular-csv-import.
@nainyshah turned out I am using outdated (2015) package that was available on npmjs... I build npm package with the most recent version of this repo if anyone needs it:
https://www.npmjs.com/package/angular-csv-import-recent
However I noticed when debugging that callback
is called many more times, not only when it finishes processing or setting is changed...
from angular-csv-import.
Related Issues (20)
- missing mdButtonTitle from documentation
- fix to encodingVisible
- can you pls explain this?
- not working condition.. HOT 1
- Please publish current version to npm
- Unexpected token { error.
- Cannot import same csv file again HOT 3
- Callback is not functioning
- acceptSizeExceedCallback is beeing called all the time and not only when filesize exceds limit
- CSV data breaks down when it's uploaded via mobile(iPad) HOT 1
- If separator is undefined csv behaves in unexpected way
- progress-callback does not work
- Issue with , separator HOT 2
- angular.js:11383 Error: [$rootScope:infdig] 15 $digest() iterations reached. Aborting!
- Don't work in IE browser
- upload the samefile doesn't work HOT 1
- Materials Attribute Not Responding Correctly
- Hiding Header not working when material isn't used HOT 2
- Button not appearing
- Different encoding not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-csv-import.