Closed tim545 closed 8 years ago
Whenever you select an element in the Elements pane, we set the global $scope
to the scope of that variable, so that's a first step. Would be nice to just get whatever you're looking at directly though.
Yeah ok I see that now... which actually works for purpose I wanted which is cool. But the feature I was wanting to replicate was something in the console when have done a console.log() from your code you can right click that log entry and select "store as global variable" (screen shot below) which then assigns it a variable name so you can do some simple manipulations on it there in the console. But of course as you said the $scope object will always be there! I just didn't notice it before.
Yep, and we'll see about adding that too! It's a good suggestion, we're a bit backlogged though.
That's ok, if you could get it into a future release sometime that would be really cool!
@tim545 I think this is tricky because variables are always in context of scope. There's no reason you can't console log in your current ng codebase, but to figure out what scope data you want is complex and requires you to poke around the DOM. Once it's done, you can do window.x = $scope so it persists
@tim545 you can use "$scope" element tab:
@ProLoser Sure no worries, I always only suggested it because I thought it would be a nice shortcut of sorts instead of logging from the code etc. but It's no big deal. I like the solutions you and @stan-kondrat have found anyway! thanks for those. If it's something that's too big to implement for a small feature I'd be happy with closing the issue, no point leaving it lying around
Thanks, @stan-kondrat, didn't know about that one! Looks good enough to close. Thanks for bringing this up and having a great attitude, @tim545
I'm not sure if this is actually possible to put into an extension but it would nice to have. Copying the object to a global variable means you can run some simple tests against it in the console, just as bit of a shorthand if your debugging something.