angular-strap icon indicating copy to clipboard operation
angular-strap copied to clipboard

bs-select is not executing a function to get a label in ng-options

Open Epotignano opened this issue 12 years ago • 12 comments

I was using angularStrap 0.7.8, and I had no problems with achieve this, the problem started when I moved to the new version of angularStrap.

this is a simplified demo:

http://plnkr.co/edit/aJHleHcROEv0Ufpnsjjz?p=preview

I can't get the getEnumMsg() function to be executed. This was working in the previous version (note that the plunkr is working with the previous angularStrap version).

I will be very grateful if somebody can help me.

Greetings.

Epotignano avatar Apr 14 '14 18:04 Epotignano

Is the first one here basically what you need? http://plnkr.co/edit/cb708zbeUD1OgKHghrHA?p=preview

The function seems to work, and it's: (from ngDocs) select as label for value in array Where label is what you see in the select thing, select is what you get in the model, and value is what's in the array at that index. http://docs.angularjs.org/api/ng/directive/select

kaustavha avatar Apr 15 '14 21:04 kaustavha

@kaustavha Thanks.

mgcrea avatar Apr 16 '14 09:04 mgcrea

This is working, but note that in the plunker, the angularStrap version is 0.6.6, is not the version 2.0....

I was doing what you said, all was working well, until I moved the angularStrap version.

I was not able to reproduce it in angularStrap v2, because yesterday the page plunkr was not working.

In the plunker that I uploaded is working well but is the previous angularStrap version.

greetings

Epotignano avatar Apr 16 '14 12:04 Epotignano

There is no support for the v0.x branch. Plunker links should be working again.

mgcrea avatar Apr 16 '14 12:04 mgcrea

Ok, I will reproduce the case now.

Epotignano avatar Apr 16 '14 12:04 Epotignano

here is the use case.

http://plnkr.co/edit/yC8wNtIoAqrq8571mOmL?p=preview

Thank you.

Epotignano avatar Apr 16 '14 13:04 Epotignano

Can I help in something? I want to get it solved, I made a big app and I used angularStrap and I'm a defender of angularStrap, and I don't want to erase angularStrap caused by this bug... :'(

Epotignano avatar Apr 17 '14 13:04 Epotignano

Quick hack-around: http://plnkr.co/edit/rYsk969a8dGuelyfiUfN?p=preview We used ng-strap for the majority and a couple handpicked angular-ui components for date and time pickers we needed in a project I worked on, you could try that. My best guess is something needs to be fixed in the paredOptions part or $activate part in select.js, but I haven't figured it out yet.

kaustavha avatar Apr 18 '14 00:04 kaustavha

I think the library must not modify the behavior of a core directive of AngularJS, something need to be fixed, I figured about the hack, but I think is not a good solution, because before, it was working without problems in the angularStrap 0.x version....

Epotignano avatar Apr 21 '14 13:04 Epotignano

@Epotignano please open a new issue with your plunkr link, indeed it looks like there is a bug somewhere.

mgcrea avatar Apr 21 '14 14:04 mgcrea

Done!

Epotignano avatar Apr 21 '14 18:04 Epotignano

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock[bot] avatar Jan 26 '19 21:01 lock[bot]