Questions tagged [ng-controller]

The AngularJS ngController directive attaches a controller class to the view. This is a key aspect of how angular supports the principles behind the Model-View-Controller design pattern.

186 questions
0
votes
1 answer

Why passed value from ng-controller is blank in Angular JS

I have made one plunker of my existing code , where I want to search the user query into the database. I can do $https call n all, its just that the data from one controller (from setSearch to getSearch) to the other is getting lost somewhere. I…
Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104
0
votes
3 answers

Running Controller in Angular and phpStorm

I'm new to angular and I'm learnign it using phpStorm tool. It looks like I've done everything right, but I still can't get the right result when I execute the following html and Javascript codes, I did lots of researches on this and made sure that…
Sam Joni
  • 159
  • 2
  • 14
0
votes
3 answers

Pass value in-between angular JS controller and services

I am trying to get the user query from html using ng-click. I want to make a https call using the value which I fetch from ng-click. I can see the data in Alert--1 but in Alert--2 i get undefined. on internet I read that passing values using…
Shashank Vivek
  • 16,888
  • 8
  • 62
  • 104
0
votes
1 answer

angularjs form not working when ng-app and ng-controller is declared in form tag

When I declare the ng-app and ng-controller the form does not do validation. If I remove them then the form does basic validation, but I want to use controller logic to perform username and password validation and routing, which I cant use (as…
akash sharma
  • 411
  • 2
  • 24
0
votes
0 answers

Choose controller to run AngularJS

I'm trying to run certain controller depending from API response. Starting with routeProvider config: .when('/objects/:objectId', { controller: ControllerChooseCtrl, template: '
' }) For example we have such format of API response…
Vitaly Nevgen
  • 67
  • 1
  • 5
0
votes
2 answers

AngularJS - function never called with ng-submit

I've created an angular-promise which calls a http method (corresponding to a rest service),which is supposed to be called when a form is submitted, using ng-submit. It never happens, and there is no error, it seems like the function is never…
user4865748
0
votes
1 answer

Display attribute of ngrepeat from ngcontroller alias

Without the ngcontroller alias, I can fetch the data. However, when with alias, I can't. What is my mistake here? HTML tags:
davidlee
  • 5,611
  • 17
  • 56
  • 82
0
votes
0 answers

"AngularJs" Parsing nested JSON in a Controller and binding to a Html table

I have JSON data in the following format : [ { "_index": "servers", "_id": "server1", "_score": 1, "_source": { "list": { "key1": { "c1": { "check_status": "PASSED", …
sasikant
  • 247
  • 1
  • 3
  • 11
0
votes
1 answer

AngularJS - ng-repeat - using parent repeat data in child http request

I have what would seem to be a simple problem with AngularJS - apologies if so. I'm new and have searched all over and can't quite find an answer to what I want to do. Basically I have a $http request that is getting a list of 'Cards' from a server…
0
votes
0 answers

How to use single service in two controller in angular js?

I have a indexpage as
Mr X
  • 1,637
  • 3
  • 29
  • 55
0
votes
3 answers

Can not share data between controllers AngularJs

Hi I`m new in AngularJS. This is my index.html file http://clip2net.com/s/3oknPG6
0
votes
2 answers

Get multiple Angular.js controllers for multilple within the same

I'm trying to add multiple angular controllers within the same tr tag, the problem is that chrome rewrites the table to standardize it, and there is no element between tr and td in the HTML table hierarchy. Here is what I currently have, each color…
overlox
  • 794
  • 1
  • 5
  • 18
0
votes
2 answers

Calling an AngularJS controller function from outside of it

I have the following code: app.controller('MatrixExpertCtrl', function($scope,$http){ $scope.PassedMatrix=[]; $scope.GetMatrixFromServer=function(){ $http.get("http://localhost:3000/getmatrixfromdb").success(function(resp){ …
Bruno Oliveira
  • 735
  • 10
  • 20
0
votes
0 answers

Controller not linking to view

I am trying to build a contact form application, and currently I am stuck on being able to perform a scope function defined in my controller. I currently have nothing being performed by this function aside from a console.log, and that alone is not…
0
votes
2 answers

Scoping issue in callback function in AngularJS controller

I have the following angular app (JSFiddle): HTML

sampathsris
  • 21,564
  • 12
  • 71
  • 98