Friday, 15 February 2013

AngularJS How to skip element submission when element is hidden -



AngularJS How to skip element submission when element is hidden -

i have dropdown list enum values. when dropdownlist hidden ng-show, value still submitted ''. getting

org.codehaus.jackson.map.jsonmappingexception: can not build instance of myenum string value '': value not 1 of declared enum instance names @ [source: com.ibm.ws.webcontainer.srt.http.httpinputstream@1024cb7e; line: 1, column: 349]

how skip validation/submission?

<select ng-show="itishidenow()" ng-model="value.myenum" ng-options="option alternative in myenumoptions"> </select>

check if element visible before submit:

$("#dropdown").is(":visible")

angularjs

No comments:

Post a Comment