compile but don't bind option elements nested in a nameless select

otherwise an exception is thrown unexpectidly
This commit is contained in:
Igor Minar
2011-01-25 17:51:01 -08:00
parent 9368ea3814
commit 9e0fa5b7c8
2 changed files with 18 additions and 0 deletions

View File

@@ -545,6 +545,10 @@ angularWidget('option', function(){
var isMultiple = select[0].type == 'select-multiple';
var scope = retrieveScope(select);
var model = modelAccessor(scope, select);
//if parent select doesn't have a name, don't bother doing anything any more
if (!model) return;
var formattedModel = modelFormattedAccessor(scope, select);
var view = isMultiple
? optionsAccessor(scope, select)