Here are some examples can easily play with:
First of all: FileRead with pure javascript, works fine: http://codepen.io/butaixianran/pen/gpxpww With angular2, ES5 javascript (generate by TypeScript), doesn't work: http://plnkr.co/edit/1MTFbVCKGGOU9XPcNVit?p=preview With angular2 and typescript at codepen: (Typescript with .t.d file won't work at codepen, following link just show you the TS source code) http://codepen.io/butaixianran/pen/XbabaO Online IDE (c9.io), sandbox with Angular2 and TypeScript, doesn't work: (can login with github account) https://ide.c9.io/butaixianran/angular2 Preview offered by this online IDE: https://angular2-butaixianran.c9.io/src/index.html Need a solution, thanks 在 2015年6月14日星期日 UTC+8下午9:52:53,ran xian写道: > > > I finally find a way to build a online example with Typescript. > > Check this from an online IDE: > > preview: > https://angular2-butaixianran.c9.io/src/index.html > > editor: > https://ide.c9.io/butaixianran/angular2 > > Again, need a solution for this. Thanks > > > > > 在 2015年6月13日星期六 UTC+8上午1:14:51,ran xian写道: >> >> [Angular2]How to use filereader.load with Angular2 and Typescript? >> >> Try to read a file from client side with Angular2 and Typescript. >> >> But when I try something like: >> >> fileReader.onload = function(e) { >> ...... >> } >> >> It doesn't work, this function will never be called. (which works in >> normal html+javascript.) >> >> Need a solution here, many thanks!! >> >> -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
