-
Notifications
You must be signed in to change notification settings - Fork 6.7k
use objects as bindToController option for modals #5039
Comments
The Using var modalScope = (modalOptions.scope || $rootScope).$new(); Then, the variables are bound to the controller using: angular.extend(ctrlInstance, modalScope); Bunt since modalScope is a child scope, it does not contain any own keys, making this feature impossible to work. Using the following would fix the issue. angular.extend(ctrlInstance, modalOptions.bindToController); |
We will support 1.5 when it gets out. Not a priority right now. |
Please dont mind the poor title choice and read my second comment. |
Can you point to examples/documentation on this? Keep in mind, we are highly unlikely to replicate isolate $scope creation in the modal itself. |
Juste try to use Here is why. During the modal creation, a new child scope is created. This child scope does not contain any own variables (even though parent scope variables are available in the partials, through the $parent chain). A few lines later, if the option |
Link to/quote the official docs where it says it - I saw nothing on the use of an object, and as far as I am aware, the use of an object with bindToController is for isolate scope binding declarations which does not apply. Also we have a unit test asserting that the usage as a boolean does work as intended, so more evidence-based proof is needed since you are asserting the opposite. |
You are not using a controller - In addition, This appears to be a non-issue. |
There is no doc about using |
Please read again the plunker, I forgot to add the controller. |
I have spend too much time trying to help you improve your (poorly written, poorly supported) angular module. You will probably be glad to know that I will never use this module again. Sayonara. |
Just read your test. How can you be content with this kind of code? It does not event test the feature it is supposed to. Only that adding a random option does not generate an error. No wonder why you have so little open issues. |
I am willing to help, but you are not very clear with your explanations (some of them were incorrect or incomplete), and your attitude is frankly lacking. Try being professional and putting together well-researched reproductions and clear explanations up front before putting together a stream of hard to parse thoughts where I have to try to predict what you are intending to say and do research in source code to figure out the intention of meaning - it is a waste of everyone's time, and probably one of the largest causes of open source slowdown. I do this in my spare time, and should not have to deal with this lack of professionalism & entitlement while providing this free service. |
@matthieusieben try the change in #5048 - this should fix the issue. We are trying to get a release by the end of the year, so this fix should be live in our 1.0 release then. |
We should be able to set
bindToController
as an object, which will be bound to the controller instead of the scope variables.The text was updated successfully, but these errors were encountered: