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.
Questions tagged [ng-controller]
186 questions
0
votes
1 answer
call a controller inside another controller Angularjs
I have declared two HTML pages in my index: Home.html and jargon.html.
Each page has its own controller loaded in the application module.
angular.module('starter', ['ionic', 'ngRoute', 'starter.homeController',…

Hana
- 239
- 1
- 3
- 15
0
votes
1 answer
Print data only in form on-click Print button AngularJS
I have multiple add-remove input field rows in my form. This is nothing but a report. There is a print button and I want to print only data entered in form in structured manner. Similar like table,column,rows and text but not buttons or input box…

ronypatil
- 153
- 2
- 3
- 19
0
votes
1 answer
Is there any way, using ui-router, to bind variables from controller into the template without using $scope?
My $stateProvider:
$stateProvider
.state('home', {
url: "/home",
views: {
"header": {templateUrl: "templates/header.html"},
"footer": {
templateUrl :…

Donovant
- 3,091
- 8
- 40
- 68
0
votes
4 answers
ng-view - Load Controller in template page
I've a module where I configure a route like this :
var app = angular.module("myModule", ['ui.grid','ui.bootstrap','ngRoute']);
app.config(function ($routeProvider) {
$routeProvider.when('/subjects', {
templateUrl:…

lpernice
- 115
- 1
- 3
- 12
0
votes
2 answers
Error while running angular js html page on a server
When I'm running my HTML page through a server I'm always getting an error with my angular JavaScript file included. But it runs fine without local server in Mozilla Firefox and Safari but not with Google Chrome (XML errors with Google…

Harsha
- 1
- 2
0
votes
1 answer
How can you iterate through controllers in an ng-repeat from the parent?
I want to write a for loop that goes through all of the child controllers and runs a function in them. At the moment the code is only running the function in one instance of the child controller. How do I iterate through all instances of the…

Kaya
- 15
- 3
0
votes
2 answers
The view/controller does not refresh with push() function using socket.io in angularjs
I'm trying to refresh the controller of my angular app to receiving objects from socket.io. Everything works fine except that the view don't show when I add a new object to the variable with the push function. Here's my…

Cesar Jr Rodriguez
- 1,691
- 4
- 22
- 35
0
votes
2 answers
Is there an angular syntax to embed controllers from different modules in the markup?
There is this SO question that seems to imply it is possible to use controllers from different modules by defining tag attributes like:
{{ whatever1 }}
{{…

Marco Faustinelli
- 3,734
- 5
- 30
- 49
0
votes
3 answers
Enable/Disable button by selected value in drop down list using AngularJS
I have one button called test and one drop-down menu with three values.
How to enable-disable Test button according to value selected in drop down menu.
Eg. If selected "Not Ready" , button should disable
If selected Ready or Attention, button…

ronypatil
- 153
- 2
- 3
- 19
0
votes
0 answers
Controller function not applying to ng-include file
I am trying to use the "minisCtrlOverall" controller in my ng-include file, but none of the functionality in my controller works for the included file unless I put ng-controller in the actual overall.html file. What I am trying to do is access the…

Neha Sohail
- 239
- 3
- 19
0
votes
1 answer
Why $http in ng-init is not getting called everytime the view is loaded - AngularJS
I have modified my question as per my observation.$http request on server side is not happening whenever the view is called second or third or so on times although initWishList (ng-init) is getting called. The scenario is as below:
I have a My…

Shashank Vivek
- 16,888
- 8
- 62
- 104
0
votes
2 answers
AngularJS ng-controller directive does not accept variable (scope function) from javascript, does not give any error either
I am relatively new to angularJS, I am trying to set up a page where inturn multiple pages are called depending upon the selection made previously.
All the pages have their own controller, so I am trying to set the controller and view src through…

Yash shah
- 1
- 2
0
votes
1 answer
Using services to send data to php in Angular-js
I am writing a simple code to send data to some php file through Angular.js. I hope I am doing everything correctly but still getting error. Can someone help me out?
Index.html