Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="file" ngf-select ng-model="vm.attachment" name="file" accept="application/pdf" ngf-max-size="5MB" ngf-model-invalid="errorFile">
- <md-button id="uploadButton" class="md-raised md-primary"> Choose Files </md-button>
- link (scope, element, attrs) {
- const input = element.find('#fileInput');
- const button = element.find('#uploadButton');
- if (input.length && button.length) {
- button.click((e) => input.click());
- }
- }
- <button ngf-select ng-model="picFile" accept="image/*"> Select Picture</button>
- File name: {{picFile.name}}
Add Comment
Please, Sign In to add comment