Comments (11)
Hi @dracostheblack , @adonespitogo
Please how did you solde this issue of model not updating in controller?
I am using Angular 1.5.7
I get undefined on debugging.
from angular-base64-upload.
It's on-change="fileChanged"
from angular-base64-upload.
I fixed that but $scope.attachment is still undefined after I do a file upload
from angular-base64-upload.
Can you post your code and angular version?
from angular-base64-upload.
Angular is 1.3.6
In my controller all I have is.
$scope.attachment={};
$scope.sendMessage = function () {
console.log($scope.attachment.filename);
};
<div class="col col-10 text-right">
<input type="file" ng-model="attachment" class="ion-paperclip text-right float-right attachment" base-sixty-four-input onerror="errorHandler" on-change="fileChanged"/>
</div>
from angular-base64-upload.
Take a look at this plunkr code and see what's missing in your code.
from angular-base64-upload.
The only thing different I see is that i'm loading my controller from my module with stateprovider.
$stateProvider
.state('inbox.landing', {
url: '/landing',
views: {
'bodyContent': {
templateUrl: 'js/modules/inbox/inbox.html',
controller: 'InboxCtrl'
}
}
from angular-base64-upload.
Are you triggering sendMessage()
within fileChanged()
?
from angular-base64-upload.
No, i was just seeing what the value of the attachment, I don't need to use fileChanged if it will update the scope variable.
from angular-base64-upload.
Also validation is not firing for me either.
from angular-base64-upload.
What is the solution?
from angular-base64-upload.
Related Issues (20)
- Using this library in ionic v2 framework running angular 2 HOT 1
- After selected a file input field shows "None selected" HOT 11
- multiple upload error HOT 4
- Re-Run validation when model value changes or allow Capability to user to run validation
- How to decode and revert file back for download
- File is valid when exceeding maxsize with do-not-parse-if-oversize HOT 1
- filetype blank on model with .docx, .doc
- Handler is not an function HOT 1
- How to preview the file HOT 1
- tableau files not supported (*.twb, *.twbx)
- Regarding License
- support ng2 or later ? HOT 1
- New Maintainer
- bro gak gini dong HOT 1
- Append files when selecting files one at a time in case of multiple upload
- Uncaught TypeError: b(...) is not a function HOT 1
- Error handling fails when csv file uploaded.
- Doesn't work inside ng-repeat
- Rotate image before parsing using exif data HOT 1
- Bower can't find version 0.1.20 HOT 2
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-base64-upload.