answersLogoWhite

0


Best Answer

If we want to call example method of "test1 DIV controller" from "test2 DIV controller" then we can write above method. angular.Element(document.getelementByID('testDIV')).scope().example method name(); in test2DIVcontroller. For Example : <DIV ID="test1DIV" ng-controller="test1DIV controller"></DIV> <DIV ID="test2DIV" ng-controller="test2DIV controller"></DIV>

User Avatar

Wiki User

7y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you call one controller method from another controller method in angular JavaScript?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

How do you show the location of an occurrence of the letter e in a string using javascript?

The location of a substring within a string in JavaScript can be found using the indexOf() method of the string type. That method will return the placement of a string as a numerical index, starting from 0. The method takes two arguments. The first is the substring you're looking for. In this case "e." The second argument is optional, and it's the "start" argument. If you define it, you define the index from which JavaScript will start looking for the substring. By default, this index is 0 (zero.) If you want to find all of the occurrences of a string using this method, you have to write a loop. To see a working example of that, check out the JSFiddle in the related links. I've also attached a good lesson on JavaScript strings in PDF.


What control and method provides a simple way to gather input from the user at runtime without placing a text box on a form?

You could use the prompt command in Javascript.


What is document.getElementById in javascript?

document.getElementById() is a JavaScript method that returns a reference to a DOM object identified by the value passed to it. For instance, if you can a form with the following HTML code.... &lt;form method="post" id="theForm"&gt; You would be able to reference the form by assigning a variable to the returned value of document.getElementById(). Such as: var myForm = document.getElementById("theForm"); You could them use the other DOM methods to manipulate this object (adding CSS styles, adding and removing children, etc.)


How do you display data in other HTML page retrieved from post method?

You can used various methods for retrieving data in HTML. JavaScript, Servlets etc are some ways to get data.


What method is used in JavaScript used to generate output?

If it's in a function, you can just write return "output"; There's also prompts and alerts alert("output"); prompt("output");

Related questions

What does javascript this mean?

In javascript, the word "this" refers to the &#144;&cent;&laquo;&Ecirc;&laquo;_owner&#144;&cent;&laquo;&Ecirc;&laquo;&#157; of the function being executed. Put another way, "this" means the object that a function is a method of.


What JavaScript method is most commonly used to generate output?

alert and prompt


What are the different ways of setting out a simple curve?

the different methods are: 1. Linear method. 2. Angular method.


What happens during an onclick event in javascript?

Whatever method is attached to the event, is executed.


Indexing method in milling machine?

Direct Indexing, Simple Indexing, and Angular Indexing


What is angular bearing?

Angular bearing is a method used in navigation and surveying to describe the direction of one point from another in terms of a horizontal angle measured clockwise from a reference direction, often true north. It is expressed in degrees, minutes, and seconds, and helps determine the orientation of one point relative to another on a map or in the field.


What is a example of a class is Javascript. Describe the properties and one method. Give two examples of objects of that class?

JavaScript is a prototype based object oriented language. This means that it doesn't have classes.


What is the meaning behind a javascript split?

The javascript split method, split(), will alter a string to make it into an array of substrings. This is useful if you would like to store each substring from the original string seperately.


What is a method in JavaScript?

Hi there, a method is a "function" in a object. Example: function answers(){ this.world = function(){alert("hello world")}; } var hello = new answers(); hello.world(); &lt;--- world is a method of the object hello.


How do you show the location of an occurrence of the letter e in a string using javascript?

The location of a substring within a string in JavaScript can be found using the indexOf() method of the string type. That method will return the placement of a string as a numerical index, starting from 0. The method takes two arguments. The first is the substring you're looking for. In this case "e." The second argument is optional, and it's the "start" argument. If you define it, you define the index from which JavaScript will start looking for the substring. By default, this index is 0 (zero.) If you want to find all of the occurrences of a string using this method, you have to write a loop. To see a working example of that, check out the JSFiddle in the related links. I've also attached a good lesson on JavaScript strings in PDF.


What is the mousePressed function for?

It seems as though this is part of Java.Swing or JavaScript. In this case this method will be called when the mouse is initially clicked on the object.


Will plugging a dualshock wireless controller into a computer usb hub hurt the controller?

No it is no problem and a recommended method to charge the controller. I also put mine into my Sony BR6 HDTV USB port to change the controller because it is always on unlike the PS3 USB port that shuts off when the PS3 does.