batarang icon indicating copy to clipboard operation
batarang copied to clipboard

allow naming of scopes

Open chrispitzer opened this issue 11 years ago • 16 comments

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.

chrispitzer avatar Oct 03 '13 23:10 chrispitzer

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!

OliverJAsh avatar Oct 04 '13 08:10 OliverJAsh

I'm talking specifically about improving this interface

chrispitzer avatar Oct 04 '13 18:10 chrispitzer

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.

larvanitis avatar Oct 29 '13 10:10 larvanitis

Ya, it's hard to grok without some way of naming things.

gflarity avatar Feb 02 '14 23:02 gflarity

+1

nickvido avatar May 05 '14 21:05 nickvido

+2

Jarno458 avatar Jun 16 '14 14:06 Jarno458

+3

coltonmccormack avatar Jul 11 '14 16:07 coltonmccormack

+4

carlgieringer avatar Jul 15 '14 20:07 carlgieringer

+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.

adamvoss avatar Jul 31 '14 19:07 adamvoss

+1

plumpNation avatar Aug 04 '14 07:08 plumpNation

+6

marcj avatar Aug 11 '14 00:08 marcj

I agree, this would really ease finding problematic scope expressions.

Delapouite avatar Oct 02 '14 14:10 Delapouite

+6.23

rhalff avatar Oct 07 '14 13:10 rhalff

++1

temega avatar Mar 25 '15 12:03 temega

++

sakalys avatar Oct 09 '15 12:10 sakalys

Commenting +1 won't make this happen any faster - if anyone's interested, we do allow pull requests!

SomeKittens avatar Oct 10 '15 16:10 SomeKittens