2 ms·
Don't get rid of $rootScope!!!! Its an essential tool for all kinda of hackery which maybe is not the best ways to do things but its the fast way. I ran into
by tlarkworthy 13y ago
Don't get rid of $rootScope!!!!
Its an essential tool for all kinda of hackery which maybe is not the best ways to do things but its the fast way.
I ran into a jqeury popup bug and there was no way to get data inside it without crowbaring the rootScope. For some weird reason it would not accept a controller within, or decorating the popup, depending on where the popup HTML was placed within the HTML file.
Note: I never worked out it was a bug or me not understanding jquery properly. The point is $rootScope can allow corners to be cut in emergency situations.
- mackwic 13y agoYou are right. It can be hackly usefull. I suggest to expose it only the internal way: via the ctrl.$get array so that you have to know what you are doing.