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

    Beautiful glow to the sky at 22:30 today. And still over a month to the longest day! Original is here on instagram. Original post on…

  • instagram cross-post

    When I arrived back from the toilet at 4am I discovered someone had stolen my pillow. Original is here on instagram. Original post on…

  • Interesting Links for 17-05-2021

    Herdwicks: The sheep that shaped the Lake District (tags: sheep uk history ) Britain destroyed records of colonial crimes (tags: UK empire…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

  • 11 comments

  • instagram cross-post

    Beautiful glow to the sky at 22:30 today. And still over a month to the longest day! Original is here on instagram. Original post on…

  • instagram cross-post

    When I arrived back from the toilet at 4am I discovered someone had stolen my pillow. Original is here on instagram. Original post on…

  • Interesting Links for 17-05-2021

    Herdwicks: The sheep that shaped the Lake District (tags: sheep uk history ) Britain destroyed records of colonial crimes (tags: UK empire…