fix(ngController): allow bound constructor fns as controllers#10790
fix(ngController): allow bound constructor fns as controllers#10790pkozlowski-opensource wants to merge 1 commit into
Conversation
|
hmm, it's really too bad we don't have |
|
actually you know what, I think this is still a kind of dumb idea, since the bound function won't have the expected prototype. It would be like giving people a footgun to shoot themselves with. I apologize for changing my mind about this twice today, but unfortunately we have no way of getting at the "real" prototype from JS :( |
|
@caitp it is OK to change ones mind if in the end it leads to better framework! I understand your position and I don't have any more arguments apart from the ones presented already:
But as I've stated before I don't feel strongly about this one as I don't need it personally. I also understand your will to "protect the innocent" and don't give people tools that they can use to hurt themselves. To sum up: I've got nothing more to say / do when it comes to this issue so if you @caitp or @petebacondarwin got a definitive opinion on this one please close / merge this PR / associated issue. |
|
We should land this, since it was available throughout for 1.2 and no one managed to shoot themselves in the foot so far; so it is probably a very unlikely thing to happen. In the meantime people do want to be able to create bound controllers in their applications and the use cases provided are reasonable. We should put a disclaimer in the documentation for Can you do that and then merge @pkozlowski-opensource ? |
|
-1 for this change. I can not think of one case where a programmer would need to do this. It's more likely they're doing something they shouldn't. I would hate to see this introduce modules that become popular but are full of odd controllers. |
Fixes #10784