hi!
On Sun, Aug 12, 2012 at 12:00 AM, <
davidc...@gmail.com> wrote:
> Thanks for the response! That's kind of unfortunate that you can't use
> conditionals in templates.
In practice it is not that bad really. For simple cases you can use
sth very simple {{ myVar || 'default' }} and for more complex cases
pulling conditional logic into a controller makes sense. Usually I'm
trying to keep my templates as clean as possible and move any
computations to a controller where those can be unit-tested.
> First thing I've found in Angular that *adds*
> boilerplate. I wonder if that's a feature being considered for the future or
> not.
I would suggest spending more time playin with angular.js. What I can
see (and other people have reported this as well) is _massive_
reduction in code base (going to crazy numbers like 10x less code for
crud apps). ngSwitch is probably _the_ most verbose constructs. So
you've just bumped into the most verbose directive, don't get
discouraged by this one.
Cheers,
Pawel