I'm a bit behind the power curve on this, but thought I would share my 
example with you...just using basic semantic-ui for styling, but it toggles 
and gives me the variable I need (although I like the directive idea).

<span ng-click="isPublic=!isPublic" ng-model="isPublic">
<div class="ui labeled large right icon green button" ng-show="isPublic"><i 
class="unlock icon"></i>Public Group</div>
<div class="ui labeled large right icon red button" ng-hide="isPublic"><i 
class="lock icon"></i>Private Group</div>
</span>

@Peter:  Thanks for the help!

Jim

On Tuesday, March 19, 2013 3:02:05 AM UTC-4, Peter Smith wrote:
>
> Hi there Andy,
>
> The CSS image easing method was where I started as shown on the first 
> switcher on the plunker. However I wanted a bit more control over the 
> colour and text.
>
> With the image method you need an image for each colour/text/font 
> variation/combination. 
>
> With the directive/template method you can change the text to 
> Yes/On/True/1/icon-check/etc and you can change the style of the on-button 
> to btn-primary, btn-warning, btn-danger. In fact the next stage is to 
> provide some configuration to allow just that.
>
>
>
> On Saturday, 16 March 2013 17:51:09 UTC, Peter Smith wrote:
>>
>> I have created a rather neat looking checkbox replacement that is crying 
>> out to be turned into a directive. However after spending the day figuring 
>> out the styling I can't figure out how to make the thing into a directive. 
>> Can anyone help? The plunker is at 
>> http://plnkr.co/edit/aBq78nWMf5dGVxbsBmP2?p=preview
>>
>> Regards,
>>
>> Peter
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to