All Questions
Tagged with angular-controller javascript
140 questions
3
votes
1
answer
46
views
Get data between two controller that there are no any relation them in angular.js
I have two controller that they aren't any relation and want to know smtg in controller1 when happen a change in controller2.
like this: Update smtg in controller2 after changing controller1 to ...
0
votes
1
answer
64
views
DeepCopy in Angularjs?
Is there a way to add the $scope data to another $scope without changing the values from which it is added? Currently, I have created one button and whenever someones click on it the following action ...
1
vote
1
answer
343
views
Angular variable returns undefined in some points of the controller but on others it returs his value
Im working a controller where I get an array of values from a service. When I have the values from the service I set the value of a variable as the first element of that array then I do a console.log ...
0
votes
1
answer
103
views
How to Access Internal script $scope value in controller function in angular JS
Here is HTML with internal script
<html>
<body ng-controller="test">
<span> {{data.name}} </span>
<input ng-model="data.name">
...
1
vote
2
answers
83
views
How to pass a parameter in AngularJS
I have a list of products in Angular JS and when I click the link for a certain item I want to sent the index of that product to a new page where to get all the details for that item (category, price ...
0
votes
1
answer
42
views
AngularJS controller prepended by a ? In Chrome
Occasionally when I update some code in my controller and then check it in chrome it will throw a controller not registered error and also a syntax error. When I look at the chrome source files the ...
0
votes
2
answers
283
views
How to use Angular $scope.variable from controller 1 in ng-class of div using controller 2
I have 2 controllers boxController.js and homeController.js. On box.html page I initialize the boxController.js. Now, I need to use ng-class on box.html page but the variable I need to use inside ng-...
0
votes
0
answers
166
views
Uncaught ReferenceError: MainCategoriesListController is not defined error is coming
The error:
MainCategoriesListController is not defined
is coming at its declaration only ,i.e, angular.module().controller(~~,~~).
Also, in categories state, in the resolve property when i try to ...
0
votes
1
answer
54
views
Unable to fetch angular controller's data into HTML
I am using Angular 1.6.
I am trying to fetch x and y positions for an SVG element from a component controller.
this.painterModel = [];
var imageRef = {};
imageRef.path='assets/images/sample.png';
...
3
votes
1
answer
378
views
AngularJS - Inject $factory into controller
I have multiple factories registered, say Circle, Square and Triangle, and a controller called ShapeController. Inside of ShapeController, I'm trying to retrieve one of the factories using its string ...
2
votes
1
answer
231
views
AngularJS $watchCollection not being called
I am trying to use $scope.$watchCollection from a controller to monitor a service I have. When my controller is originally called, the watch gets called, but every time after it doesn't.
My ...
0
votes
1
answer
3k
views
Google places API automatically get place from a string
In my Page I'm querying my backend to get an address and placing that address in my input.
Now using Jquery I get that input value and want to get the place from google places api.
//placing value ...
1
vote
2
answers
398
views
How to transition an angularJS application to angular
I currently have a simple search functionality defined in AngularJS (https://next.plnkr.co/edit/qpyvZuvI8vw8q6on?open=lib%2Fscript.js&preview) but I'm hoping to migrate this feature into an ...
0
votes
1
answer
122
views
ANGULARJS :How to send radio button value from controller to another?
I have two radio buttons redirecting to same application.jsp page but I just want to add/remove few fields on that application based on button that is clicked.
For example- if btn 1 is clicked i want ...
0
votes
1
answer
34
views
Make Controller get information from a directive
I have a directive, that in its scope has an object. This is static information right now and I want to make this visible for every controller in my app. Is there any way to do this?