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.
1
vote
1answer
23 views
Can't include ngMessages Module in Angularjs application after bower install
I'm having a lot of trouble trying to install and import the angular-messages module in an angularjs project. Here is the error message
Uncaught Error: [$injector:modulerr] Failed to instantiate ...
0
votes
1answer
13 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', ['...
0
votes
0answers
15 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
77 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
93 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
45 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
42 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 ...
0
votes
1answer
200 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 ...
1
vote
2answers
755 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
566 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="...
2
votes
0answers
117 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, $...
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
55 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
30 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
495 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
1answer
108 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
149 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-...
0
votes
3answers
181 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
134 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
74 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
117 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 ...
-2
votes
1answer
137 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
2answers
550 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) {
...
0
votes
1answer
388 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
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....
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 ...
0
votes
1answer
255 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>...
0
votes
2answers
79 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
(...
2
votes
1answer
57 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 ...
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 ($...
2
votes
1answer
205 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"></...
1
vote
2answers
54 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 ...
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
51 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 ...
1
vote
1answer
3k 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&...
0
votes
2answers
308 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() = function(userSrv)...
0
votes
2answers
109 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"&...
1
vote
1answer
982 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 ...
1
vote
1answer
209 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
28 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
168 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. ...
0
votes
2answers
216 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
80 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', [
'ui....
2
votes
1answer
921 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
562 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
87 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
(function(...
0
votes
1answer
119 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
160 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 ...