Subject: Breaking News: Carbs making a come-back

From: Stop Absorbing Starch <[email-masked]>
Date: Fri, 22 Aug 2014 08:02:29 -0700

TODAY ON OZ

| Episodes | Recipes | Topics | Archives | Oz Blog | Ask Oz

Aug 22 2014 - Episode Recap

The Carb-Friendly Way to loose inches and embrace your hunger.

Watch Clip Here

This DocOz tip will have carbs going right thru you, without being absorbed

TOP STORIES

3 Ways to Cut Your Risk of Cancer

Bloat-Boasting Food Guide

Biggest Health Lies You've Been Told

<< PREV | TODAY | NEXT >> |

( to modify your message status with Alert Center Notifications 1400 South Jama Goddard, KS 67052) or go here

ng-class (as of 1/19/2012) now supports an expression that must evaluate to either 1) a string of space-delimited class names, or 2) and array of class names, or 3) a map/object of class names to boolean @Mark, BTW now that I have checked I can say that this method is working in v1. It still useful in some cases. Note that object property names(keys) are not necessarily true or false, it can be anything that you want to add, I was having an issue because I was using syntax like {classname: '$index === selectedIndex'} and it wasn't working. When I pushed everything together and used == instead of === it worked. can I use an expression for the classname too? For example ng-class="{'item-focus-'+focusIndex : focusIndex Unfortunately not all javascript expressions are valid angularjs expressions. Perhaps you could ask for a intent is to derive a classname with a variable value when a condition is met. without doing it in the I was asking, what you really want to happen i
n the end. Deriving class name is probably not your only option. I would gladly try to help if your intent was clear, but I cant think of a reason why you need such realize there may be workarounds for my particular use case (which I am already employing), but I'm interested in a solution for the abstract problem it is not a workaround if a solution does not necessary have the same problem. Without knowing about your problem, let me tell you what I mean by that. Perhaps you could use two ng-class directives, one for item-focus and another for index. In CSS, you could then check for existence of both classes using something like .item-focus.4 If this solves your issue, I would not consider this as a workaround. It is using right tools favorite === 0, '<server value>': favorite < 0} would correctly evaluate my initial (server) value and then make one correct toggle. The third toggle would break. Seems like a three state switch does not work correctly with this syntax. I had t
o revert to the "old" array based syntax to achieve the desired result. My code works with: ng-class="{'1':'favoriteon', '0':'favorite', '-1':[email-masked]'}[favorite]