256 questions
0
votes
0
answers
30
views
What is the meaning of components inside array when declaring angular js module?
I am new in angular js. I have the following code
angular.module('app', ['components'])
.controller('MyApp', function($scope) {
$scope.message = "Hello World!";
});
what is the meaning ...
-1
votes
1
answer
453
views
Error - AngularJS Uncaught TypeError:angular.service is not a function at taskService.js:2
I'm having these errors in angularJS, with well-imported libraries, I don't know what might be happening. Exactly these two:
Uncaught TypeError: angular.service is not a function
at ...
0
votes
0
answers
52
views
Unable to access an angularjs module inside another module
I have an angularJS app with three modules: myApp(parent/core module), services(contains all the factories and services), and controllers(contains all the controllers).
This is my app.js file
angular....
1
vote
0
answers
73
views
Issue with lazy loaded angularjs child module with routes (states)
I'm working with an angularjs + ui-router application which is a shell application of my other angularjs application (basically header + footer + sidenav).
Each application I'm developing is complied ...
1
vote
2
answers
91
views
Uncaught Error: [$injector:nomod] while Angularjs separating code into Controller and Service files
I'm trying to split the code into Controller and Service files as below.
Module.js
/// <reference path="../angular.js" />
/// <reference path="../angular-resource.js" />
var ...
0
votes
1
answer
109
views
How to use module function inside another factory in angularjs
I have configurations.js file which having
var configurationModule = angular.module('configuration', ['restangular', 'notification']);
configurationModule.factory('clientConfigSvc', function (...
0
votes
1
answer
66
views
One controller not working out of the two I used in my angular module
I used two controllers in my angular module, but one is not working, I don't know what is wrong, I've browsed online for solution but I can't get what's wrong.
var app = angular.module('myWebsite'...
0
votes
1
answer
423
views
Getting Error: $injector:modulerr Module Error when adding angular-bootstrap-lightbox dependency
I am trying to add a dependency for the project, is a simple gallery lightbox for angularjs.
https://github.com/compact/angular-bootstrap-lightbox
I followed the steps, tried using npm, I ended up ...
0
votes
2
answers
439
views
ngMaterial throwing Error: [$injector:modulerr]
I am using ngMateril for custom dialog. But I am getting error as Error: [$injector:modulerr]. I am not able to figure out the error. Any help would be appreciated.
External scripts in my HTML code
...
-2
votes
2
answers
388
views
Angularjs Routing Parameter passing to controller
Below code is not working for parameter passing
<li class="active" ng-disabled="disabledAction"><a href="#!/Reservation/821" ><i class="fa fa-fw fa-pencil-square-o icon-push"><...
0
votes
1
answer
150
views
`$injector:modulerr` when Importing submodule in angularjs
I am having some trouble importing my sub-module when using the AngularJS framework.
I have created the module and its dependencies, checked my import order and imported the js files in the index....
3
votes
1
answer
2k
views
How to bootstrap two Modules using bootstrapModule() in Angular2?
Normally this is how a Module is integrated or bootstrapped with the main.ts.
import {platformBrowserDynamic} from'@angular/platform-browser-dynamic'
import {AppModule} from './app.module'
...
2
votes
1
answer
2k
views
Uncaught Error: [$injector:unpr] Unknown provider:
I'm currently getting this error trying to load my Angular App:
Uncaught Error: [$injector:unpr] Unknown provider: $$HashMapProvider
<- $$HashMap <- $$animateQueue <- $animate <- $...
0
votes
1
answer
836
views
Can parent module directives be used in child modules like controllers?
Just as controllers are module "level" independent and can be used anywhere in the entire application stack I am wondering if there is a way for child module to use the parent modules directives ...
4
votes
1
answer
3k
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 ...
1
vote
3
answers
1k
views
Angular js: How to Use constants values in other services without changing it
I am new to Angular js and want to set the global variable that I can use it on different different services as webservice url.
I have implemented app.js (module) like this:
var app;
(function () {
...
0
votes
2
answers
354
views
Can't inject constant to other modules angularjs ionic
I want to use constant variables which can be called from anywhere in the project.
I made 'constants.js'.
angular.module('myApp.constants', [])
.constant('const', (function(){
return {
...
2
votes
2
answers
221
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
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 ...
0
votes
3
answers
546
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
1
answer
1k
views
Angular Js routing not working properly when file separated
//this is the app.js go down below to see controller.js
angular.module('myFirstApp',['ngRoute'])
.config(function($routeProvider){
$routeProvider.when('/contact',{
templateURL : 'contact....
0
votes
1
answer
353
views
What is the difference between using bower and npm for adding angular module?
I am trying to add a new angular module.
https://github.com/angular/bower-angular-animate
I noticed that there are 2 ways to add an angular module. One is using bower. The other is using npm.
$ npm ...
1
vote
1
answer
139
views
How to design two modules include the same dependency issue in angularjs
I have an app module which include another modules for example module a and b. But both module a and b depends on module c. See the followings
var app = angular.module('app', ['a', 'b']);
app....
1
vote
1
answer
151
views
factory is undefined when using ng-file-upload
I have a form in which I save some details and upload a file. I have a factory from which I get some data. When I use ng-file-upload the factory is undefined. Here is the code:
angular.module('...
0
votes
1
answer
346
views
"Restangular" Error: $injector:modulerr Module Error
I try to make authorization in my app with angular.
I created app.service and injected "Restangular". And i have this error
Error: $injector:modulerr Module Error Failed to instantiate module ...