Comments (8)
Hi ~ i think below code can give some help.
<div ng-controller="DemoController">
<lf-ng-md-file-input lf-files="files01"></lf-ng-md-file-input>
</div>
The lf-files attribute is working same as ng-model, so you should fetch data from $scope.files01
var app = angular.module('demo', ['ngMaterial','lfNgMdFileInput']);
app.controller('DemoController',function($scope){
$scope.$watch('files01.length',function(newVal,oldVal){
console.log($scope.files01);
});
});
After you selected file it should console a array on Developer Tool, then you can get what you want from objects .
e.g. If you only want get files to upload via ajax you should enum files01 and get file from lfFile property.
from angular-material-fileinput.
@shuyu thanks for snippet. yes I am able to get image data now. but I am little confused that how can i use in my forms.
right now on submitting form i am getting json object (item_info) with all fields data. should i merge or bind file01
and item_info
or there is a better way to do this
from angular-material-fileinput.
okay that's how i did it
var logo = $scope.files01[0].lfFileName; $scope.item_info.logo =logo;
but wondering how to set image back to preview after getting from database.
from angular-material-fileinput.
Thanks for your recommend ~ I still look for a good solution to implement that ...
from angular-material-fileinput.
hi.. how can i get the file data?. i want to save that in another folder
from angular-material-fileinput.
How can I post this to php manually. I try to post the form but $_FILES is empty. I post all the form and do not use AJAX.
The question is how to use this with the classical type
Currently i use
<input name='image' type='file'/>
How do I replace this classical with the new style using angular-material-fileinput?
from angular-material-fileinput.
How can I post this to php manually. I try to post the form but $_FILES is empty. I post all the form and do not use AJAX.
The question is how to use this with the classical type
Currently i use
How do I replace this classical with the new style using angular-material-fileinput?
Do you solving this problem ?
I need help in same topic
from angular-material-fileinput.
from angular-material-fileinput.
Related Issues (20)
- like ng-change on fileinput HOT 4
- Getting warning when I add angular-material-fileinput in my code
- [FEATURE] Add return check to lfOnFileRemove event HOT 1
- Any update in angular 2
- Error on Load: Trying to load lfNgMdFileinput.html? HOT 1
- Unhandled exception if files is not an array
- Zip file previews binary content
- lf-required with condition
- Convert files to base64 format
- Show preview file without binary data
- Cannot read property 'name' of undefined HOT 2
- onSubmitClick with parameters
- "Adobe PDF Document - Access denied." Pop-up when previewing a PDF on IE11
- "Choose Files" still showing ontop of BROWSE button
- Sketch files freeze the browser
- Add lf-required Conditionally based on value HOT 1
- error when using it with angular 4 HOT 1
- How can use multiple image input on same page ? HOT 1
- Add support for npm HOT 1
- Selecting directories
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-material-fileinput.