batarang
batarang copied to clipboard
allow naming of scopes
Currently scopes are listed like so...
scope (123) ...scope (128) ...scope (141) ......scope (142)
This is problematic, because I have to do a lot of digging to find the thing I'm looking for. I propose the following upgrade.
If I have specified the optional property "scope.batarang_name" it will show up as the name of the scope in batarang.
I'm not sure if this will help, but I'm in the process of forking this project to add a controller tree view: here is an example.
You can click on to the controller names to inspect the corresponding elements. So far this only works with explicit controllers (elements with the ngController
directive). If you have any ideas for improving it, let me know!
I'm talking specifically about improving this interface
I am renaming the $scope.$id
property inside my controllers with something like this:
DEBUG && ($scope.$id += '-APP_CTRL');
which makes it appear as scope (008-APP_CTRL)
and even enables multicontroller naming such as 012-FORM_CTRL-PERSON
.
The problem is after manually changing the scope id I get { This scope has no models }
in dev tools.
Ya, it's hard to grok without some way of naming things.
+1
+2
+3
+4
+5; I'm new to angular though, so would also be interested in hearing if the need for this is the result of some code smell and there is a better way to do things that avoids this.
+1
+6
I agree, this would really ease finding problematic scope expressions.
+6.23
++1
++
Commenting +1 won't make this happen any faster - if anyone's interested, we do allow pull requests!