JavaScript Accessing an angular controller from the console (Chrome or Firefox) access angular controller from console,access angular controller from javascript,

I have attached a picture of the click action I want to run from the Chrome console, with various values passed. The button is highlighted in gray top right in the inspect element. It is the savePublish() function I want to learn how to access/use.

enter image description here

The button element is inside a <div ng-controller="ProductEditCtrl as ctrl" .. > container, but of course there are other controller wrappers on the page aliased as ctrl

My question is, how do I access the savePublish() method directly from the Chrome console? And a bonus question-answer would be, how would I load the ProductEditCtrl controller and then call the savePublish method on a different page?

Answer:1

I need a regex for javascript for matching "{any group of chars}" <-- where that last " is not preceeded by a \ examples: ... foo "bar" ... => "bar" ... foo"bar\"" ... => "bar\"" ... foo ...

I need a regex for javascript for matching "{any group of chars}" <-- where that last " is not preceeded by a \ examples: ... foo "bar" ... => "bar" ... foo"bar\"" ... => "bar\"" ... foo ...

I'm trying to accomplish a couple things with JS/CSS that I can't figure out. Here's what I've got so far: http://codepen.io/melissall/pen/PPWPQE I want the headline to be centered in the image until ...

I'm trying to accomplish a couple things with JS/CSS that I can't figure out. Here's what I've got so far: http://codepen.io/melissall/pen/PPWPQE I want the headline to be centered in the image until ...

  1. css javascript scroll to bottom
  2. css javascript scroll
  3. css js scroll
  4. css js scroll to top
  5. javascript css scroll position
  6. scrollbar css js
  7. css javascript animation scroll
  8. css javascript smooth scroll
  9. css js horizontal scroll
  10. css js smooth scroll
  11. css javascript disable scroll

I have a huge table that PHP gets from a db and displays. Every time php echos a few rows of the table, it flushes the output. So from the client's point of view, the table is basically growing bigger ...

I have a huge table that PHP gets from a db and displays. Every time php echos a few rows of the table, it flushes the output. So from the client's point of view, the table is basically growing bigger ...

  1. javascript flush event queue
  2. javascript flush event

I created a simple snake game after following some simple tutorials on YouTube. The problem is that the game does not have a pause function (e.g. when pressing P the game should pause/resume) and ...

I created a simple snake game after following some simple tutorials on YouTube. The problem is that the game does not have a pause function (e.g. when pressing P the game should pause/resume) and ...