Andrew Ducker (andrewducker) wrote,
Andrew Ducker
andrewducker

Nobody hates computers more than someone who works with them.

Although in this case I'm at home, having great fun, having taken a day off.

I'm still trying to make computers do things though - in this case I'm getting more stuff with AngularJS working. So far it's much, much better than doing things directly with JS/HTML - it feels like what HTML _should_ be if you're going to write proper applications in it - declarative statements about what data should be displayed where, and how to format it, which then get filled in automatically.

This, for instance, is a combobox/select, with the contents of a list in it:
<select ng-model="currentInput" ng-options="input.userName+'@'+input.siteName for input in data.inputs"></select>
so that I get a list of inputs, each formatted nicely, with the currently selected one stored in "currentInput". So much easier than the standard way of working with it.

Oh, and it supports transclusion, so I can split my HTML into small parts that are loaded on demand, rather than stuffing everything into one file. Magic!

Of course, I got completely stuck a few days ago, trying to work out why on earth my dialog boxes weren't working. Dialogs aren't part of the base Angular functionality - but they are part of the Angular UI collection, rebuilding Twitter Bootstrap in Angular-speak, so that you only need the Bootstrap CSS, not all of its JS and nomenclature. So I loaded in the code, started working through things, and hit a brick wall. A brick wall I just leaped happily over when I discovered that I was using Bootstrap CSS 3.0.2 and Angular Bootstrap only supports version 2.3. Switch over to the old version of the CSS and magically everything starts working...

It's these kinds of things that turn a half-day task into a three-day one. *sigh*



Original post on Dreamwidth - there are comment count unavailable comments there.
Subscribe

  • instagram cross-post

    Oh no, a scary witch! Original is here on instagram. Original post on Dreamwidth - there are comments there.

  • Interesting Links for 26-10-2021

    Could Brexit affect beach water quality? (from 2016) (tags: UK waste pollution faeces Europe ) Auto-aiming bow vs. flying targets (a very…

  • Interesting Links for 25-10-2021

    Why is the idea of 'gender' provoking backlash the world over? (tags: gender bigotry authoritarianism LGBT transgender ) Sewage emptied at…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 11 comments

  • instagram cross-post

    Oh no, a scary witch! Original is here on instagram. Original post on Dreamwidth - there are comments there.

  • Interesting Links for 26-10-2021

    Could Brexit affect beach water quality? (from 2016) (tags: UK waste pollution faeces Europe ) Auto-aiming bow vs. flying targets (a very…

  • Interesting Links for 25-10-2021

    Why is the idea of 'gender' provoking backlash the world over? (tags: gender bigotry authoritarianism LGBT transgender ) Sewage emptied at…