Pasvaz/bindonce

Not working with Angular RC1

MaestroJurko opened this issue · 10 comments

TypeError: undefined is not a function
at bindonceDirective.link (http://127.0.0.1:8282/js/Components/angular-bindonce/bindonce.js:225:26)

angular.extend(this, ctrl); instead of return ctrl

I can confirm the problem (I saw the same symptom on a different line, any reference to bindonceController.someFunction could fail this way) and the fix works. Thanks.

I'm having the same issue, in the same way as above, at bindonce.js:230:25. Has there been a fix implemented for this?

Thanks!

Fine that I'm not alone with that problem.

bower.json
"angular-bindonce": "git@github.com:zeitiger/bindonce.git#6b5fafe57ac02618f61cac771471f96af454b7f6"

Somewhere around line 217 of bindonce.js you will find this line

return ctrl;

Change it to this....

angular.extend(this, ctrl); 

And you should be fixed.

any updates?

👍

The fix from mattsahr worked for me, thanks

For what it's worth, Angular 1.3 is implementing built-in functionality for binding once, which seems to have mostly deprecated this directive in the application I am building. See angular/angular.js@cee429f for details.

mattsahr's fix worked for me as well..