The angular.module is a global place for creating, registering and retrieving Angular modules. All modules (angular core or 3rd party) that should be available to an application must be registered using this mechanism.

learn more… | top users | synonyms

11
votes
2answers
3k views

Using a factory inside another factory AngularJS

I have a module... angular.module('myModule', []); And then a factory angular.module('myModule') .factory('factory1', [ function() { //some var's and functions } ]); And then another ...
1
vote
1answer
18 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. ...
0
votes
1answer
26 views

Angular module dependency

is possible I start my angular module without some dependency? it's my angular.module angular.module("app", [ 'ngSanitize', 'ngAnimate', 'ui.router', 'ngMaterial', 'ngRoute', 'ngCookies', ...
494
votes
10answers
109k views

AngularJS : Difference between angular-route and angular-ui-router

I am new to AngularJS. I find Angular quite interesting and planning to use angular in my big apps. So I am in the process to find out the right modules to use. What is the difference between ngRoute ...
0
votes
2answers
14 views

AngularJS: Module not found error when creating module from asynchronous function's callback

When i try to create angularjs module in usual way, it works perfect, but when i try to execute same code inside a callback function of aync function call, it throws error that module not found: The ...
0
votes
1answer
50 views

Angularjs module error

I am new to angularJs, trying to make app which use camera and save images in firebase. I am following one tutorial and getting this error. I tried to fix it but it didn't work out. Pls help guys. I ...
0
votes
0answers
25 views

AngularJS modularity and configuration

I have a feature that has controllers, services, and templates in it which I want to use in two separate projects. I've put template and controller names into a constant so I can change if I need. It ...
-2
votes
1answer
16 views

How to integrate two angular js modules from two different servers?

We want to develop a angular js module for our application and want to integrate in other angular js app. These apps renders from two different servers. I have read about angular js multple modules ...
0
votes
1answer
27 views

google angular module don't work

I add this to my proyect: https://angular-ui.github.io/angular-google-maps/#!/ i follow the suggestion and add this files to my proyect mvc in the BundleConfig (Downloaded by Nuget): ...
0
votes
2answers
16 views

angularJS global filter module

I am having trouble getting my custom filter to work. I have a module of global filters: angular.module('globalFilters', []).filter('dateRange', function () { return function(item) { ...
1
vote
2answers
2k 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 ...
45
votes
6answers
36k views

is there a way in Angularjs to define constants with other constants?

I'm trying to define constants with other constants, but it seems that it can't be done, because the initial constant isn't ready when the required constant depending require it. I want to be sure if ...
0
votes
1answer
30 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
50 views

Angular js directive in module not working correctly

I have one module call "menuLeft", when module he initiate ,not loading correctly my directive, but if run my function en el method "run" correctly. I dont know why is this. This is my code ...
1
vote
3answers
92 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 ...
0
votes
1answer
58 views

Angular JS: How to use ng-repeat with custom directive and dynamic model?

I've a template as follows: <div class="row search-panel"> <div ng-show="loadingAirports"> <i class="glyphicon glyphicon-refresh"></i> Searching... ...
2
votes
1answer
27 views

How do you design a module that a user has to pass config data to when they depend on it?

I have an angular module that is basically a client side web service layer (work in progress). I have a module declaration, and a factory called "baseRequest". baseRequest is depended on by other ...
5
votes
2answers
49 views

controller function in angularjs?

I am new to angular js Controller is not working correctly in my code i am trying to run following code <!DOCTYPE html> <html data-ng-app > <head> <title>Using AngularJS ...
0
votes
2answers
35 views

Refer to service in run immediately after definition?

I would like to attach a string from a service to every request. Attempt: 'use strict'; angular.module('main') .service('Foo', function () { self.bar = 'haz'; }) .run(function ...
1
vote
2answers
38 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 ...
2
votes
1answer
81 views

Vanilla AngularJs not loading up.

I am new to Angularjs. Trying to make a basic application. Getting stuck. I loaded the angularjs <script type="text/javascript" ...
1
vote
3answers
379 views

Meaning of the empty array in angularJS module declaration

In my previous question, I understand that the code var app = angular.module('myApp', []); connects the module app to the view myApp. I would like to know why we are having the empty array [] in the ...
0
votes
1answer
19 views

How do angularJS modules work in multipage applications

If you have a webpage that uses one module across several pages, does that module need to be loaded every time a new page is opened or is it just loaded in the initial page (assuming there is no ...
0
votes
0answers
31 views

Running an initialize Parse function inside of an AngularJS module

I've read that a good way to initialize Parse is when the module is created. I made the following code, however Parse does not seem to be initializing when I run my program. Am I missing something ...
15
votes
4answers
43k views

AngularJS: Uncaught Error: [$injector:modulerr] Failed to instantiate module?

I am new to AngularJS and working my way through some documents and tutorials to learn. My question is in reference to Egghead's video series, this video in particular, demonstrating how to put ...
1
vote
1answer
74 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 ...
0
votes
2answers
57 views

ReferenceError: invalid assignment left-hand side (app.js:41:27) & nothing is displayed angular

After starting my server I navigate to 'localhost:8000'. The only thing I see is console error "ReferenceError: invalid assignment left-hand side" for row $scope.userLogin() = ...
2
votes
1answer
401 views

Angularjs Uncaught Error: [$injector:unpr]

I am developing shoping website with java and I am using angurajs. I have problem with thise files: DashboardControll.js 'use strict'; var app = angular.module("DashboardApp", []); ...
0
votes
2answers
59 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 ...
0
votes
0answers
108 views

angularjs list item displaying horizontally by using directive

I want to display angularjs material design list . I have used directives to achieve this. The problem is sub list item nodes are rendering in the same line of its parent Node. I want to render in a ...
25
votes
4answers
11k views

How to check for the existence of a module without an error being raised?

In Angular 1.2, ngRoute is a separate module so you can use other community routers like ui.router instead. I'm writing an open-source module that aims to work for multiple different router ...
-1
votes
1answer
278 views

Angular: Module was created but never loaded

I am have trying to fix this but not able to find a solution since a long time. I an angular newbie and trying to make my website home an angular app. The angular app has a controller and 2-3 ...
0
votes
1answer
40 views

Rootscope for Modules in Angular Js

Does having multiple modules in an angular app means there are multiple $rootScope? If yes, how can we communicate between multiple $rootScopes?
2
votes
1answer
24 views

Dependencies within the module dependencies?

If mainApp has dependencies on module app1, app2, like angular.module("mainApp", ['app1', 'app2']), this does not imply the dependencies between app1 and app2, right? Or say, this does not mean ...
0
votes
1answer
42 views

Separate nav from ng-view

I'm brand new to Angularjs and am trying to set up a new site but I'm confused as to the set up. I have a module and am using $route to successfully navigate but I'm lost as to what to do with my nav. ...
1
vote
1answer
409 views

AngularJS : Routing to controller from a separate module

I am trying to modularize a feature I am developing in an existing angular.js application. I have created namespaced modules for all the different sections of this feature, which we will call feature ...
0
votes
2answers
54 views

Angular modules based on conditions

Is there a way to load/specify modules based on conditions inside a controller ? var app = angular.module('app',['ngRoute']); app.controller("DemoCtrl",["$scope",function($scope){ var a = true; ...
0
votes
1answer
40 views

App Dependency wierd behaviour AngularJS

First I am very very new to AngularJS so it might be a newbe problem. I have a declaration of my app Dependancies in my app.js file: (function () { angular.module('inspinia', [ ...
1
vote
1answer
71 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 ...
2
votes
1answer
314 views

AngularJS Error: $injector:unpr Unknown Provider githubProvider <- github <- MainController

I'm trying to build my own service by following the example in the documentation for the factory methodology. I think I've done something wrong however because I continue to get the unknown provider ...
4
votes
5answers
239 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 ...
1
vote
1answer
42 views

Angularjs $injection::unpr error

I am trying to inject my service, but I keep getting unpr error. I followed the angularjs doc, but it didn't seem to solve it. I am at a loss for why this error keeps coming up. My Service ...
0
votes
1answer
67 views

Making promises in modules

I try to make facebook registration module in my app. Facebook API is faster than my Angular controller, so promise should be used here. The problem is that $q seems to be an empty object and defer ...
0
votes
2answers
127 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 ...
1
vote
1answer
61 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) { ...
1
vote
2answers
32 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 ...
3
votes
3answers
58 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: ...
0
votes
1answer
114 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'; ...
0
votes
0answers
26 views

How to make configurable directives via providers/ .config()?

Problem: I want to make a directive that works like this: svg-icon('company-logo') I'd also eventually like this to be (jade/html): svg-icon('company-logo', { height: '3em', width: '3em'}) ...
0
votes
1answer
144 views

Multiple partial views on AngularJS

I have an AngularJS application that has a list of contents on the menu. When the user clicks on an item on the menu, the content loads on the main view. There are multiple content types: When "1" ...