Quantcast
Channel: Ember.JS - Latest topics
Viewing all articles
Browse latest Browse all 4840

Input helper for type="file"

$
0
0

@litao84 wrote:

I wonder how to handle the onchange event of "input type='file'" and found the following helper works well.

   <input id="mp3file" type="file" {{action 'mp3Changed' on="change"}} accept=".mp3" title="Select a MP3 file"/>

In controller.js or compenent.js

actions: {
  mp3Changed() {
    alert("The selected file changed! ");
 },

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4840

Trending Articles