Closed SethArchambault closed 11 years ago
Hi, two problems here:
$scope.status_options
is no real JavaScript Array but a String in JSON format. By this, angular will create a new checkbox for every character in the string, which is probably not what you intended. Solution: Remove the starting and ending '
.id
attribute from the select
box, as otherwise you are creating more than one checkbox with the same id, which jqm does not like :-)<option>
requires a value
attribute. So change <option>{{status_option.name}}</option>
to <option value="{{status_option.name}}">{{status_option.name}}</option>
.Together, a working fiddle looks like this: http://jsfiddle.net/YzFEG/2/
I keep this issue open to fix the following in the adapter:
<option>
element does not require a value
attributeTobias
@tigbro Thanks so much!!
BTW - how did you figure this out so quick? Debugging Javascript libraries confuses the hell out of me, like even knowing that
Hi,
The fiddle uses a concatenated version ("jquery-mobile-angular-adapter-standalone.js") that includes jQuery, jQuery Mobile, AngularJS and the adapter. I know all of them at least to some extent...
Tobias
Awesome! Thanks for the tip.
This is working now as expected, see this fiddle: http://jsfiddle.net/YzFEG/6/
Closing this...
Using the guide set up here: http://jquerymobile.com/demos/1.2.0/docs/forms/selects/custom.html
With this code in the view:
And this in the controller (in the right place):
Yields this error in console:
JSFiddle Here: http://jsfiddle.net/doercreator/YzFEG/1/
Thoughts?
Using Chrome V27 on Mac.. thanks!