These are chat archives for angular/material

20th
Nov 2015
Fannar M. Sigurðsson
@fannarx
Nov 20 2015 10:03
Hi, I am having some troubles making checkbox render true on the initial state. (plunker example http://plnkr.co/edit/opmKZHOfdmj7DjUXGv63?p=preview )
Does some one want to help me a bit :)
Miloš Stanić
@MilosStanic
Nov 20 2015 10:11
@fannarx add ng-init="product.status=true" to your md-checkbox
Fannar M. Sigurðsson
@fannarx
Nov 20 2015 10:12
ah, but of course.
misclick on enter sry, Milo wont that just make every box checked true ?
Miloš Stanić
@MilosStanic
Nov 20 2015 10:19
I thought that's what you wanted
what did you actually want?
Fannar M. Sigurðsson
@fannarx
Nov 20 2015 10:19
Nono, you can see that i would want product.status to dictate if it should be true or false. (lets say this was populated from a database that would tell if the values should be checked or unchecked)
Miloš Stanić
@MilosStanic
Nov 20 2015 10:22
your data doesnt contain true and false booleans, but 'true' and 'false' strings, that's why it's not working
Fannar M. Sigurðsson
@fannarx
Nov 20 2015 10:23
Doh' theese silly mistakes ;) . thank you !
Miloš Stanić
@MilosStanic
Nov 20 2015 10:23
np, you're welcome