yuguang / fiddlesalad

An online playground with an instantly ready coding environment. Combine language preprocessors, CSS, HTML and JavaScript to create and share coding examples.
fiddlesalad.com
GNU General Public License v3.0
232 stars 80 forks source link

Doesn't update output automatically when used with AngularJS #25

Closed movstox closed 11 years ago

movstox commented 11 years ago

Hi there,

I tried using http://fiddlesalad.com/coffeescript/angularjs-one-page-template/ with AngularJS. I can't get it to update output automatically. I have to click 'refresh' each time.

Is there a solution for this?

Thanks so much.

yuguang commented 11 years ago

My hypothesis is that as angular.js is loaded, it parses the HTML looking for template tags. The way to fix this is to reload the library every time. I'm going to make a fix so that it reloads every time when there are template tags.

Yuguang

On Wed, Sep 25, 2013 at 6:10 PM, movstox notifications@github.com wrote:

Hi there,

I tried using http://fiddlesalad.com/coffeescript/angularjs-one-page-template/ with AngularJS. I can't get it to update output automatically. I have to click 'refresh' each time.

Is there a solution for this?

Thanks so much.

— Reply to this email directly or view it on GitHubhttps://github.com/yuguang/fiddlesalad/issues/25 .

yuguang commented 11 years ago

If you're interested, read my post on the upcoming work to make AngularJS work smoother http://yuguangzhang.com/blog/using-encapsulation-to-make-an-awesome-angular-js-editor-in-fiddle-salad/.

yuguang commented 11 years ago

Hi,

The bug you reported has been fixed. You will notice automatic refresh checked for Angular under Tools.

movstox commented 11 years ago

Thank you. It works when I update CoffeeScript. But it doesn't seem to function when I update Jade.

yuguang commented 11 years ago

It also works with Jade now. I'm looking for a way to refresh without the flickering.

movstox commented 11 years ago

Thanks. If we introduce refresh delay, say 30 seconds? That might fix flickering..

yuguang commented 11 years ago

I fixed the flickering with a JavaScript and CSS solution http://css-tricks.com/prevent-white-flash-iframe/.