Closed btford closed 10 years ago
@btford, would this functionality be implemented in angular-hint, or should it be a separate module?
@ealtenho @btford
Although this isn't quite the same functionality of hint-dom, they both relate to controller best practices. It seems like to avoid having an unnecessary amount of angular-hint-* modules, we should consider grouping them together a little differently.
I think this should be a feature in erin's -dom and that we should maybe change the name to hint-controller since it deals more with bad practices of the controller and less about the dom itself. Personally, grouping like this makes more sense to me. Thoughts?
@caguillen214 @btford Actually, this was why I had asked about it being a separate module, since it does sound related to my implementation. Still, I think it is important for angular-hint-dom to convey that the best practice there is about not manipulating the dom. I'm not sure what the compromise should be there. @btford thoughts?
I think it would be better to have this as a separate module for a variety of reasons:
There are a few different "best practices" for controllers, so I'm thinking this could be the start of an angular-hint-controllers repo
I think another module sounds right to me. I will look into implementing this feature.
My local repository for beginning development: https://github.com/ealtenho/hint-controller
@btford, I think I have a working prototype of this feature, but I'm concerned my tests are insufficient: https://github.com/ealtenho/hint-controller/issues/2. I'm also unsure of how we plan to integrate this with other angular-hint repositories?
I believe this has been addressed and should be closed
$controller
will load modules off ofwindow
if it can't find the controller elsewhere.This is okay for tiny, illustrative examples, but otherwise not a great practice.
here's the offending js:
You should be able to decorate
$controller
to check if the|| getter($window, constructor, true);
code path was taken.