Topic: File input component
knowlative pro asked 6 years ago
Hi,
I'm using file input component, but when I select a file, the path does not appear.
This is my code:
<form [formGroup]="gForm" (ngSubmit)="onSubmit()">
...
<div class="md-form">
<div class="file-field">
<div class="btn btn-primary btn-sm float-left">
<span>Choose file</span>
<input type="file">
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" placeholder="Upload your file">
</div>
</div>
</div>
...
</form>
How can I solve this problem?
Thanks
Add comment
Damian Gemza staff answered 6 years ago
Dear knowlative,
File input needs also .ts code. Did you used .ts code in your component.ts file also ?
https://mdbootstrap.com/angular/components/inputs/
Let me know.
Best Regards,
Damian
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Resolved
Specification of the issue
- ForumUser: Pro
- Premium support: No
- Technology: MDB Angular
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags