TypeError: undefined is not a function
Closed this issue · 7 comments
Hi @jmorrisIII ,
I don't see any error from here. Is it on the live example page or ?
http://pc035860.github.io/ngSelect/example/#/select-multiple
It happens in my project. I'm sure its something I am doing.Any ideas what would cause it?
I'm still new at Angular so any help to point me in the right direction would be a great help. thanks.
Hi, are you using the latest version of ngSelect.js in your project?
It seems that your line numbers are different from mine.
From my POV, the only code in NgSelectCtrl.ctrl.setModel
is
_ngModel.$setViewValue(val);
which is related to ng-model
in your HTML code.
You may want to check your ng-model
expression, e.g. its not settable or you just forgot to add one.
Thanks for your help. I had an older version. When I downloaded with bower it gave me the older version. I had to download via zip to get the new one. Also I had to change line 205 to enable select-multiple.
return (iAttrs.selectMultiple === '' || Number(iAttrs.selectMultiple) === 1);
to return (iAttrs.selectMultiple !== '' || Number(iAttrs.selectMultiple) === 1);
Hey, sorry about the bower issue. I forgot to make a new release for the latest breaking change from v0.1.1...
I just released v1.0.0, the bower package should work fine now.
thanks.