The angularjs-module tag has no wiki summary.
2
votes
1answer
10 views
When pulling angularjs controllers out into different files, what if my module doesn't load first?
When my module does not load how can I load it correctly?
Suppose I have tens of controllers and I would like to separate each controller into its own file. For this example suppose I have one ...
0
votes
0answers
25 views
Check that an object is instanceof angular
HTML:
<div id="obj"></div>
in jQuery:
var obj = $('#obj');
obj instanceof jQuery;
'true'
So, I assumed that
angular.module('app', []) instanceof angular.module()
to be true..
...
1
vote
1answer
24 views
AngularJS Module Dilemma - Single or Multiple
For a mid sized application I'm developing, and having watched the Best Practices video by Misko among other articles, I have deduced that I don't need more than one module.
Questions first, ...
0
votes
1answer
41 views
How to spy on ServiceProvider?
What
In my AngularJS app, I am trying to spy on some internals like angular.module and serviceProvider.
How
I have succeeded in spying on angular.module
var moduleCalls = spyOn(angular, ...
1
vote
1answer
24 views
How to inject controllers in AngularJS?
How do I get this setup to work?
app.js
var app = angular.module('app', ['ui.router', 'app.controllers']);
/* FooCtrl isn't available here, why not? */
controllers.js
var controllers = ...
0
votes
0answers
26 views
Declare angular modules dependency on basis of some data from server
I have created two different modules in app.js like:
app.js
angular.module('userModule', []);
angular.module('adminModule', []);
angular.module('mainApp', ["userModule","adminModule"]);
I want ...
0
votes
0answers
32 views
Link to different angularjs app
I have two different AngularJS applications hosted on different servers. I want to be able to have a link in one application to the other. How can I do this? Is it just as simple as adding an href to ...
2
votes
1answer
56 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 ...
1
vote
1answer
209 views
AngularJS: uncaught object because of services and modules dependencies
I have a 'maps-services' module with a 'MapService' service as below:
angular.module('maps-services', [])
.service('MapService', [$log, function($log) {
this.initMap = function() {
}
...
0
votes
2answers
441 views
Argument 'HeaderCtrl' is not a function, got undefined
I have some issue testing my controller in AngularJS, I got the following error:
enter PhantomJS 1.9.7 (Linux) Controller: HeaderCtrl Should redirect on a new user form FAILED
Error: Injector already ...
5
votes
1answer
57 views
How should I make configurable modules in AngularJS
I've been tinkering with AngularJS and I've built up a small collection of directives and services that I would like to package into a single JS file so that I can use them anywhere.
I have some ...
2
votes
1answer
122 views
Dependency errors in Angular when creating an $http interceptor as a standalone module
Here is a working example of how I have set up an interceptor which attaches an authentication token to each request (this is more or less the example from ...
1
vote
2answers
194 views
Getting nested angular modules to inject properly
I am having an issue with injecting the angular toaster service into a factory object I have, when I get toaster injected without errors, the ngAnimate injection fails on the toaster. As far as I can ...
2
votes
1answer
36 views
Why must a provider be defined before a config block
I have a module. It has a config block, a provider, and a constant defined. The config block references both the constant and the provider. I notice that my constant can be defined before or after ...
1
vote
1answer
53 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 ...
2
votes
1answer
221 views
Creating virtual keyboard as a AngularJs module?
I have a AngularJs app and I need to create a virtual keyboard. The keyboard should be a separate module. My problem is that I am not sure how to properly structure my module? Should it be implemented ...
0
votes
2answers
118 views
AngularJS Failing to Instantiate Module
For some reason, my angularjs module isn't loading correctly. I am pretty new to this and I've read a lot of tutorials, but I can't seem to get this working.
[17:22:36.338] Error: ...
0
votes
0answers
31 views
Learning Angular Seed Notation
I was following a question (ui bootstrap modal's controller 'is not defined'), which I then tried modifying for nested controllers, different scoping calls, and renaming/refactoring the ...
0
votes
2answers
26 views
How to Create Multiple Instances of Angular Module
I have an app with the following basic structure,
weatherDisplayController.js
weatherGrabbingService.js
userColorPreferencesService.js
When the user changes their color preferences for viewing ...
1
vote
1answer
52 views
Config that applies to all instances of an Angular directive
I'm looking to include global options for an Angular directive.
I could use a .constant() (or simply an object of configs) in my module file, but since the module is designed for other people to ...
6
votes
2answers
325 views
AngularJs Lazy Loadng without RequireJS
In a large scale application, How do we lazy load modules, controllers, services whenever needed without loading those in the index.html. Here I'm referring to load the entire js in the relevant ...
0
votes
2answers
17 views
Why isn't my angular factory loading?
Example... Plunker
addon.js:
(function () {
'use strict';
angular.module('jzAddons', [])
.factory('jzThemeFac', function () {
return {
themes:[
{
name: 'none',
...
1
vote
1answer
185 views
How to declare sub-modules in AngularJS
When working on large projects in AngularJS, I found that I like organizing code by functionality.
That means that when I have some recognizable functionality X (especially if it is reusable) I create ...
3
votes
2answers
6k 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 ...
0
votes
1answer
638 views
AngularJS failed to instantiate module
Im new in AngularJS and im trying to create an authentication service but I'm getting this error.
Error: [$injector:modulerr] Failed to instantiate module flujoDeCaja due to:
[$injector:modulerr] ...
0
votes
1answer
636 views
Missing provider for filters "Error: [$injector:unpr] Unknown provider: $pinyinFiltersProvider <- $pinyinFilters
I read several questions/answers about this common and correct some issues related to :
distinction between module and filter ;
module declaration in app.js ;
and injection into another module ;
...
1
vote
1answer
31 views
having trouble using the angular.module directive to create a new module
I am having trouble using the angular.module directive to create a new module. here is the code to create the module:
angular.module('dcuapp', [])
.config(dcuRouter);
function ...
1
vote
2answers
180 views
How to create a module at runtime in AngularJS?
I want to be able to create AngularJS modules at runtime, so I do this:
<section class="panel portlet-item" id="crashpanel"></section>
<script type="text/javascript">
var angularApp ...
0
votes
0answers
91 views
Angular Js geolocation module
I am trying to implement geolocation in my angular app and found that with the help of geolocation module i can do it. i i installed this module in my app as described on the git hub. They have given ...
0
votes
1answer
73 views
Why is it necessary to specify Angular modules with factory functions, instead of similar how I specify Node modules?
I've recently begun using angularjs. But it's concept of modules confuses me.
In one of the angular tutorials, there's the following code:
'use strict';
/* Services */
var phonecatServices = ...
0
votes
1answer
91 views
Controller is not defined
I'm trying to use the Angularjs-UI Modal into my application and I'm a little confused as to what goes where. I have a button for new groups which calls a model, the models controller is in another ...
0
votes
1answer
637 views
spreadsheet module for angular JS
I am looking for a spreadsheet component to use in an Angular JS application. I found a tutorial on the web about making a spreadsheet using angualr, but I want something more advanced, for example ...
4
votes
2answers
1k 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
0answers
38 views
How do I get all the resources and configuration defined in an AngularJS module? [duplicate]
Given an AngularJS module
var myModule = angular.module("myModule", ["ngResource"]);
how can I list all the services, directives, constants, configuration, etc defined in it using
...
61
votes
4answers
14k views
Difference between angular-route and angular-ui-router
I am new in angular. I find angular quite interesting and planing to use angular in my big apps. So I am in the process to find out right module.
What is the difference between ngRoute ...
0
votes
1answer
584 views
AngularJS Modules/Scope Sharing
I recently started using AngularJS and the way I'm building my apps now is like this:
MainController.js
var app = angular.module('app', ['SomeController', 'MainController']);
...
0
votes
1answer
48 views
Angularjs Module factory service issue
i have written a simple factory service.
here the link to the fiddle
http://jsfiddle.net/#&togetherjs=caUQB0merH
I am unable to determine why the fiddle is not working. Can any one point out the ...
1
vote
1answer
105 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 = ...
1
vote
1answer
1k views
angular module is not available
This is surely a noob question but I just can't seem to figure out what is wrong with this simple module initiation (JSFiddle):
var myApp = angular.module('myApp', []);
I get an error saying that ...
6
votes
1answer
3k 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
0answers
51 views
AngularJS after run module action
Is there a possibility of launching AngularJS function after the application?
Something like function afterRun() ?
This is to ensure that when the application starts to perform some jquery-scripts.
1
vote
3answers
189 views
how to manage big angular app
I'm having trouble managing my app. I would like to separate my controllers on several files. I read Brian's Ford blog ( http://briantford.com/blog/huuuuuge-angular-apps.html ) but I cannot quite ...
0
votes
1answer
196 views
Angular custom module - “object function(){…} foo has no method 'bar'”
I'm trying to create a custom wrapper for $http in angular. Here's the code outline:
angular.module('jotted_resource', ['ng'])
.factory('jotted_resource', ['$http', 'communicationStatus',
...
8
votes
4answers
6k 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 ...
1
vote
2answers
65 views
Configuring AngularJS modules - how does it affect the other modules in the app?
I have two Angular modules, A and B.
A has no deps, some configurations and some filters:
angular.module('A', [])
.config(function ($httpProvider) {
// set common headers for $http requests
...
0
votes
3answers
900 views
How do you change the ng-model attribute of an element (and have it work)?
I have an input with an ng-model attribute set to "search.name"
HTML
Search:
<span id="searchName"> titles </span> | <span id="searchSpecies"> species </span>:
<input ...
9
votes
1answer
1k views
How to use two AngularJS services with same name from different modules?
Supposed I have two modules for AngularJS, e.g. foo and bar, and both of them define a service called baz.
In my application I depend on them by saying:
var app = angular.module('app', [ 'foo', ...
1
vote
1answer
289 views
AngularJS - Unknown Provider
I'm trying to create a small note-taking application using AngularJS, but I stumbled at the very beginning. Here's my .js file:
var app = angular.module("app", ['ngResource']);
app.factory("note", ...
0
votes
2answers
1k views
Why is my javascript file not loading?
I'm new to both JavaScript & AngularJS. I'm building an app which talks to a building management system: it has a module called 'JaceMod' containing a service to contact the BMS and retrieve data ...
5
votes
1answer
333 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 ...