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

0
votes
1answer
9 views

Any issues when injecting the same dependency across different modules within the same app?

I'm currently attempting to modularise an angular app by splitting it into features with each feature being a module that has it's own dependencies. Example structure: angular.module('myApp', ['...
854
votes
15answers
196k views

What is the difference between angular-route and angular-ui-router?

I am new to AngularJS. I find AngularJS quite interesting and am planning to use AngularJS in my big applications. So I am in the process to find out the right modules to use. What is the difference ...
0
votes
0answers
10 views

Loading Angular-Gannt with Requirejs

I am using Angular-Gantt Chart for one of my project. The project uses RequireJS for loading all the libraries. I tried loading angular gantt using the RequireJS config but it fails to do so. From my ...
1
vote
4answers
66 views

(AngularJS) Can't inject factory into controller

I'm trying to inject my factory into a controller. If I list the factory as one of the controller's parameters, I get this error: Error: [$injector:unpr] Unknown provider: wordRushFacProvider <- ...
2
votes
2answers
89 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
1answer
43 views

AngularJs used with Play cannot find or instantiate module

I am using the Play Framework (2.5.9). On my scala html template, I pull in Angular via WebJars. I next specify the module and controller I want to use for my page. However, when I try to load the ...
0
votes
3answers
39 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 ...
19
votes
5answers
15k views

Is it possible to override constants for module config functions in tests?

I've spent quite a while banging my head against trying to override injected constants provided to modules' config functions. My code looks something like common.constant('I18n', <provided by ...
0
votes
1answer
145 views

Get angular module name in javascript

I want to get Angular Module name in JavaScript. Means i want to retrieve module name of angular js application in my javascript file so that i can apply other functionality on that module. I want ...
63
votes
8answers
64k 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 ...
18
votes
5answers
80k 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 ...
18
votes
1answer
9k views

How to share data between two modules in AngularJS?

I am using AngularJS along with c# mvc. I have a home page where user enters some data and that should be passed to the second module where I use this data for processing and decisions. I have to use ...
0
votes
3answers
1k views

AngularJS Error: [$injector:modulerr]

I have following angular code which is in my /public/javascripts dir in my node project: var app = angular.module('userContent', ['angularUtils.directives.dirPagination']); app.controller('MainCtrl',...
1
vote
5answers
2k 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
680 views

Nested modules in AngularJS

I Have 2 differents AngularJs modules : a widgetContainer and a widget. A widget can be displayed as an independant application or be included into a widgetContainer. A widgetContainer contains 0-N ...
0
votes
1answer
509 views

App Module Not Found AngularJS

For some reason its giving me errors when i try to run this code. (i will post code then error at bottom): index.html: <!DOCTYPE html> <html> <head> <meta id="meta" name="...
9
votes
1answer
4k views

Angularjs - how to correct inject service from another module that is not depending?

I didn't understand how work modular depending. I have 4 modules, they are dependent on each other, as shown in the picture. "App" module includes "module1" and "module2". "module2" includes "core" ...
2
votes
0answers
113 views

Use angular-ui-notification in anuglar service instead of controller?

I am able to use above mentioned module in controller with below syntax but while try to use same in service its not working. app.controller('regulationCtrl', function ($scope, $rootScope, $http, $...
34
votes
6answers
18k 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 ...
0
votes
1answer
29 views

Can anyone explain to me difference between angular.module('myApp.data') and angular.module('myApp')?

i want to understand the difference between angular.module('myApp.data') and angular.module('myApp').
1
vote
3answers
54 views

How use shared services with controllers that use no shared services?

Assume there is a module with only one factory (the shared service). angular.module('sharedService', []) .factory('sharedSrv', sharedService) function sharedService() { var number; return { ...
0
votes
1answer
29 views

angularJS: Provider of app A not available in config of app B; app B is the main app attached to DOM

I have a Provider defined in an angular module say A, and I am trying to use it in the config of another angular module say B, as shown in the following code snippet: var A = (function(ng){ 'use ...
1
vote
1answer
453 views

How to use constants defined in one file in another in angularjs

Well I have seen couple of questions in StackOverFlow related to this but couldn't find proper answer. Say in my app.js file I have defined a constants object which basically has controllers names. ...
0
votes
3answers
102 views

Get service from separate angular module

You have 2 angular modules, and one of those modules has a service that you want to use in the other module: var moduleA = angular.module ('moduleA', []) .service('FirstService', ...
6
votes
2answers
1k views

Angular Module Private Members

In AngularJS, is it possible to create private controllers or services which can be used within the module they are defined in, but not by another module they are injected into. For example, can ...
0
votes
1answer
103 views

Memory leaks witht the “angular.module” getter?

John Papa recommends chaining instead of creating variables while dealing with modules (see the modules section) : avoid using a variable and instead use chaining with the getter syntax He ...
1
vote
1answer
138 views

AnguarJS module to wrap javascript libraries

I'd like to use a library in my angular project that provides sliders written in javascript/jQuery. Therefore I would write a directive inside my project, with a certain interface to use the library-...
1
vote
1answer
1k views

karma.conf.js uncaught referencerror: google no defined

when i try running the karma test runner, i'm getting a error as the following from one of my files, saying that my library google is undefined??? Chrome 36.0.1985 (Mac OS X 10.9.4) ERROR ...
-2
votes
1answer
130 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
3answers
156 views

Angularjs Multiple modules

I am writing a website and I need two AngularJs modules: ngRoute and ui.bootstrap. Now, my script for ngRoute is var ngRouteApp=angular.module('ngRouteApp',["ngRoute"]); ngRouteApp.config(['$...
1
vote
1answer
129 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. ...
14
votes
2answers
9k 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 factory ...
0
votes
1answer
71 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', '...
0
votes
2answers
114 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
1k 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
31 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 ...
0
votes
1answer
58 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): bundles....
0
votes
2answers
516 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
4k 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 ...
0
votes
1answer
376 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
78 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 (...
0
votes
1answer
246 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... </div>...
2
votes
1answer
56 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
55 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
44 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
52 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
198 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" src="https://code.angularjs.org/1.4.8/angular.min.js"></...
2
votes
3answers
2k 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
27 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 ng-...
0
votes
0answers
49 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 ...