AngularJS


“So why do you want to use AngularJS”?
“Because my technical lead says to use it.”

Job done. No longer my problem :) .

I had a bash at making it go today. My goal was: to make a webpage that would act as an expanding classification list using the JSON data available at biodiversity.org.au . It’s pretty cool, but I am having one rather nasty drawback.

The expanding list template, of course, needs to include itself as a sub-template. What’s happening is that Angular is freezing on startup – eventually Firefox says “hey – this script is unresponsive, you want to kill it?”. Thing is: if you do kill it, then press the “open ANIMALIA” button, nothing happens. Press it again, and the taxa start openning up and everything is sweet.

So obviously the angular template compiler is in some sort of “before I compile this, I need to compile the things it includes” loop. I need some way to explain to it that it is not to do this. It seems to be able to defer template compilation, because it eventually does work ok.

Oh – other issue is cross-site scripting, of course. I had to write a local webapp to serve up the pages that also had a little servlet to proxy the JSON from biodiversity.org.au .

But, if I can get that initialization sorted out, it’s pretty sweet.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: