Questions tagged [angular-module]

You can think of an Angular/AngularJS module as a container for the different parts of your app – controllers, services, filters, directives, etc.

Most applications have a main method that instantiates and wires together the different parts of the application.

Angular apps don't have a main method. Instead modules declaratively specify how an application should be bootstrapped. There are several advantages to this approach:

  • The declarative process is easier to understand.
  • You can package code as reusable modules.
  • The modules can be loaded in any order (or even in parallel) because modules delay execution.
  • Unit tests only have load relevant modules, which keeps them fast.
  • End-to-end tests can use modules to override configuration.

Full documentation on AngularJS modules.

555 questions
0
votes
1 answer

Use angular 1.5 component from module a in module b (using ES2015)

I'm trying to create a new setup for an app using jspm, systemjs and angular 1.5. I have a structure more or less like this: src common (pieces common to entire app, some services, images, etc) components (separate components of the app that…
0
votes
0 answers

Angular dynamic content using modules

So my application is growing and becomming a fullscale enterprize application. Because of this clients of my application has different request as to how it should look and feel. Some of them want all of the content and some of them wants only…
Marc Rasmussen
  • 19,771
  • 79
  • 203
  • 364
0
votes
1 answer

AngularJs - Injecting child module into other child module

I have a scenario which might sound stupid but I'm stuck and trying to understanding what might be causing it to not work. I have an angular app which has three modules for now var app = angular.module('mainApp', ['ngRoute']); //parent module var…
0
votes
0 answers

having 2 app or one app with multiple modules

I am using angular and i wanted to know which one is better. I have my template which i have split into header,footer,side menu and main content. I wanted to know whether to use one module per section and then have another module to enclose the…
0
votes
1 answer

How to return widgetDefinitions with data service in malhar-angular-dashboard?

I have installed the malhar-angular-dashboard module. I do not want to hard code my widgetDefinitions, so I created a service witch will return the array with the widget objects. I am using a rest service to return data such as the widget names,…
que1326
  • 2,227
  • 4
  • 41
  • 58
0
votes
0 answers

How to find location of failing import source in angular

I have inherited a large angular codebase, and when I run it (using gulp if that matters), the page partially loads, and looking at the dev panel shows that a module has failed to load. Here is the trace: Error: [$injector:modulerr] Failed to…
soandos
  • 4,978
  • 13
  • 62
  • 96
0
votes
1 answer

passing angular services through modules

I am looking at the code of HotTowel-Angular and I am trying to make a small example using it but I can't get it to work. This is my code: var app = angular.module('myApp', ['common']); var common = angular.module('common',…
Ashkan Hovold
  • 898
  • 2
  • 13
  • 28
0
votes
2 answers

How to use custom module AngularJs

how can I start to use this module: http://gregpike.net/demos/angular-local-storage/demo/demo.html I have a controller: app.controller('FormController', function ($scope, localStorageService) { }); And I injected localStorageService as shown in…
0
votes
1 answer

Combining different ngModules similar to jQueryUI

Is there any way/place where I can combine all my ngModules and include them using single js file(something similar to jqueryUI). Of course I can combine them using tools like YUI, but for my requirement is there any functionality that does the same…
me_digvijay
  • 5,374
  • 9
  • 46
  • 83
-1
votes
1 answer

Compile Module dynamically with providers in Angular 14

I need to create a module with a composite of submodules that represents minimum required imports for my package to work. This composite of modules depends on external config, and i want to compile submodules dynamically without taking care about…
-1
votes
1 answer

Where do I put code to initialize before custom module initialization in Angular 14?

I'm using ngrx/data 14 and Angular 14. I have built a custom module that I load in my app.module.ts file like so @NgModule({ declarations: [ AppComponent ], imports: [ ... AppRoutingModule, MyCustomModule, ... ], …
Dave
  • 15,639
  • 133
  • 442
  • 830
-1
votes
2 answers

Why this error trying to split the routes related to a specific module in my Angular application?

I am finding this problem following an Angular course. Basically the instructor it is showing how to split the routing from the app.module.ts file putting the route related to a specific module into the related module. Basically I have an AuthModule…
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
-1
votes
2 answers

Setup Angular Core module - AngularModules

Well, I'm trying to setup an Angular Core Module. I already created the core module and inside the core module I created a Service called Dummy. src/app/core/dummy.service.ts import { Injectable } from '@angular/core'; @Injectable({ providedIn:…
Raj
  • 19
  • 4
-1
votes
1 answer

Using Shared and Core modules besides Feature modules in Angular?

In my Angular app, I follow this approach to build my architecture and added shared.module.ts file to the shared folder. I also use lazy-loading in my app, but at this step I am very confused regarding to the imports, declarations and exports that…
user5871859
-1
votes
1 answer

Angular 7 - Trouble with angular-ng-autocomplete when trying to build

I spent a loft of hours try to build an angular app because I have a trouble with angular-ng-autocomplete. The problem is with pipe "highlight": Template parse errors: The pipe highlight could not be found. I tried to fix with some alternatives but…
1 2 3
36
37