Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
3 answers
1k views

Difference between module dependency and service dependency in AngularJS

I don't understand what's the difference between module dependency and service dependency. For example, angular.module('components.users', []) .controller('UsersController', function(Users) { ...
user1888955's user avatar
1 vote
1 answer
1k views

Angular failed to instantiate modules in production build

I'm trying to add features requiring new third party modules to an Angular app, using gulp and bower. Everything is fine in dev mode but any new modules I add produce the notorious "Failed to ...
Travis's user avatar
  • 2,462
2 votes
1 answer
77 views

Another way to inject in Angular

I have a template and I'm changing the way to Inject dipendecies. It has the 'classic' way to inject. I want to replace it with the compact form. I can't do these line of code. I've tried but I can't ...
panagulis72's user avatar
  • 2,169
1 vote
1 answer
1k views

Load angular module at runtime with/without ocLazyLoad

I have a couple of modules that I am trying to load at runtime based on some conditions. Currently I am using theocLazyLoad module but I am the loaded module's are not working at all. Everything loads ...
naughty boy's user avatar
  • 2,159
0 votes
1 answer
97 views

Angular Services within Modules

Having difficulty injecting a service into another service. I want a service hierarchy, where I can pass/request logic to/from the parent service, for sake of brevity and encapsulation. So for ...
kmunky's user avatar
  • 203
0 votes
0 answers
284 views

Angular JS: Importing Sub Modules under a Main Module

Definition: Module: app, app.core (common services), app.widgets(common directives) Components: Actual Controllers, Services, Directives definition I have been working with separation of concerns and ...
Ankit Tanna's user avatar
  • 1,831
2 votes
1 answer
2k 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 ...
Sinha's user avatar
  • 803
9 votes
3 answers
5k 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 ...
jsh6303's user avatar
  • 2,040
0 votes
0 answers
393 views

Convert to module application- AngularJS module dependency

I started to remodel my AngularJS (fully working) page to modular version. I grouped my files to 4 modules: -band -user -layout -core And main app.js with: (function () { angular.module('zt', [...
Michał Wiatr's user avatar
0 votes
2 answers
166 views

Why does Yeoman scaffolding for AngularJS use the same module for each tab

I'm new to AngularJS and setting up my projects with Yeoman. Yeoman generates a scaffold for a basic AngularJS tab nav web site controlling tab content in the following way. app.js: 'use strict'; ...
Ben Pearce's user avatar
  • 7,114
0 votes
1 answer
1k views

Module not getting injected in another module

I am trying to inject a module as a dependency of another module. Here's my code for that - USER.JS - 'use strict' var module = angular.module('startUp', ['ngMaterial', 'ngRoute', 'signUpModule']...
Pratik's user avatar
  • 1,138
0 votes
1 answer
121 views

When to specify angularjs dependency modules?

I've seen some instances where you can immediately use angular services in providers, e.g.: .module('yea.buddy', [ 'ui-translate' ]) .config(function($translateProvider) { ... }) versus .module('...
NewToMS's user avatar
  • 65
2 votes
1 answer
203 views

How to fix an angular.module not working with dependent modules?

I'm pretty clear on how angular.module works, but this eludes me for whatever reason. In my code I have the following var app = angular.module("myApp", []) app.controller("MainCtrl", ...) but my ...
Pilkington's user avatar
1 vote
0 answers
105 views

How to remove non existent modules prior to injecting them in main module?

I am using AngularJS v1.2.16 I have 3 angular projects, one application and 2 components, all 3 are configured independly via requirejs. Now, let me talk about the main js file of each of these 3 ...
mavaze's user avatar
  • 1,187
-1 votes
1 answer
55 views

How my angular module is using service which i haven't defined as dependency?

I have defined my angular modules as below: var myApp = angular.module('myApp', [ 'ngRoute', 'facebook', 'myApp.services', 'myApp.directives', 'myApp.controllers' ]); angular....
Manish Kumar's user avatar
  • 1,176

15 30 50 per page