All Questions
Tagged with angularjs-controller angularjs-module
23
questions
7
votes
2answers
78 views
List dependencies injected
Is there a way to know what dependencies were injected into my Angular module?
angular.module('myModule', [
'ui.bootstrap'
])
.controller('myController', [function () {
// var dependencies = ...
5
votes
5answers
820 views
Angular.js Controller Not Working
I'm new to Angular and I'm going through the Intro to Angular videos from the Angular site. My code isn't working and I have no idea why not. I get the error
Error: ng:areq
Bad Argument
Argument '...
3
votes
3answers
96 views
Where is the controller in this simple AngularJs page?
I am told that every AngularJS page with the ngApp directive has a controller, providing for $scope. In the earliest, simplest example given by the W3Schools site the code has no ngController tag:
&...
2
votes
1answer
673 views
Error: [ng:areq] Argument 'TasksCtrl' is not a function, got undefined
I started receiving the error and can't figure out what's wrong. Am I missing something?
js
var app = angular.module('Todolist', []);
app.controller('TasksCtrl', [
'$scope', function($scope) {
...
2
votes
2answers
204 views
Angularjs Modules - Packaging Directives and Their Controllers
I have the following javascript code and i ran into a issue:
My .js file
angular.module('MyApp',['ngMaterial','ngMessages'])
.controller('MainCtrl',['$mdDialog',function($mdDialog'){
this.openDialog ...
1
vote
5answers
4k views
How can I have multiple controller files?
SOLVED
So after viewing your responses and making minor changes to my code, I found a simple typo which prevented me to reach the result I was after. So thank you all to helping with where I was ...
1
vote
2answers
62 views
Controller not working in Angular JS
I am new to Angular JS. To see the working of controller, I implemented this simple code where two numbers are taken as an input from the users and their sum is calculated in the controller and the ...
1
vote
1answer
11k views
Why am I getting the Angular $injector:modulerr error here? Using 1.5 beta
The markup
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Angular I&...
1
vote
1answer
73 views
Angular in 60ish minutes routes issues
I was wondering if someone could take a quick gander at my code and let me know if I am missing anything. I am trying to learn Angular.js, and have been using the famous Angular.js in 60ish minutes ...
1
vote
1answer
1k views
Can I have two angular.module calls to the same ng-app in two different files?
I have an angular.js app that is declared with ng-app="audioApp" in the <body> tag of the html file.
If I have an angular.module call in one javascript file:
var app = angular.module('audioApp'...
1
vote
2answers
8k views
AngularJS Modules and External Controllers
I have a page containing multiple containers. Each container will have its own controller but point to one factory, which handles all the logic interacting with a web service API. I would like to have ...
1
vote
1answer
359 views
Argument 'indexController' is not a function, got undefined
This has been asked before but it didn't answer my question. I am pretty new to angular and I am just putting things together at the moment. I am trying to get my factory to work inside my controller. ...
1
vote
2answers
52 views
Whis is the error in angular, I couldnot find it
here is my code.. where I made problem.. please help me out.. I am trying to create a controller what fill fetch data and show in html li part.. but I don't understand where is the error.. I have ...
1
vote
1answer
477 views
Inject sub module to main module
I want to inject my sub module to main app, but I have injection error
(Error: [ng:areq] http://errors.angularjs.org/1.3.5/ng/areq?p0=SelectionCtrl&p1=not%20aNaNunction%2C%20got%20undefined
it'...
1
vote
1answer
339 views
Angular.js namespacing modules controllers
I have following structure in my application directory:
scripts/
modules/
module1/
controllers/
MainController.js
module2/
controllers/
MainController....
1
vote
1answer
2k views
Angularjs controller initialization
I am learning AngularJs. I am creating my first application on Plunker but it fails to initialize the controller. what am i missing exactly?
Here is the link of my plunker project
<html ng-...
1
vote
1answer
26 views
Controller is not registered error after adding ngRoute `.config`
Controller is not recognizing - AngularJS error
I've a controller defined in controllerPloyee.js called controllerPloyee which was working before i added the ngRoute and made to route. The error that ...
0
votes
2answers
125 views
Function problems in AngularJs
I'm a beginner in Angular and I have a problem with the functions. I have a simple code. In that there are two alerts to probe they are not getting called.
HTML
<div data-ng-controller="MainCtrl"&...
0
votes
1answer
741 views
accessing collection inside json object angular
I am new to angular
in the following controller i need to access the object store in my html. But it is not working. Any help
(function () {
'use strict';
angular.module('app')....
0
votes
1answer
37 views
One controller not working out of the two I used in my angular module
I used two controllers in my angular module, but one is not working, I don't know what is wrong, I've browsed online for solution but I can't get what's wrong.
var app = angular.module('myWebsite'...
0
votes
1answer
929 views
Calling service.js file from controller
I have a service file which needs to be called from the controller. Can someone please tell the code which should go in the controller to get this service file. Thank you.
This is my service file ...
0
votes
2answers
164 views
Swapping AngularJS syntax causing an error
so I have been making websites for a while now but only really things for display and information. I thought I would have a go with AngularJs, so I followed the guide on codeschool. I had worked for a ...
0
votes
3answers
450 views
angularjs 1 manual bootstrap doesnot work
I am new to angularjs.
I tried to create 2 different modules in an single js file and them manually bootstrap one of them to a element. This was suggested in one of the stackoverflow questions. But ...