ng-modules Questions

1

I'm currently working on an Angular application (version 16.1.3) which utilizes standalone components. This application also relies on an Angular library that uses NgModules. I'm attempting to impo...

10

ERROR in node_modules/@angular/common/http/http.d.ts:81:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class. This likely means that t...
Gershom asked 8/4, 2020 at 5:35

5

import { SpinnerComponent, ExternalLibrary } from 'external.library' @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, ExternalLibrary ], bootstrap: [AppComponent] , ent...
Duty asked 12/6, 2018 at 13:7

1

I have an issue with "platformBrowserDynamic().bootstrapModule(app.app_module)" call, the error message is "Uncaught Error: ASSERTION ERROR: Type passed in is not NgModuleType, it does not have 'ɵm...
Schreck asked 15/2, 2020 at 17:19

2

Solved

i have created a shared module and declared & exported the component i need in other modules. import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import {...
Mantooth asked 18/3, 2020 at 13:34

2

I am new to angular and trying to separate my modules in Angular2 app having the following directory structure. I have my module and other components declared in the AppModule, but I am getting an...
Tench asked 1/12, 2016 at 13:25

3

Solved

So I have encountered a practice where people will create a module for each component that has service dependencies. that way, when someone wants to use a given component, they dont have to read th...
Squinch asked 26/4, 2019 at 3:3

2

Solved

I've created a fresh new component via: ng g mytest1 Then I changed the constructor line to this: constructor(private dialogRef: MatDialogRef<Mytest1Component>) { } , and added the requ...
Firenew asked 19/2, 2019 at 18:44

5

I am new to Angular 2. What is @NgModule actually in Angular 2? I referred through the official documentation by the Angular. But I didn't have any clarity.
Linehan asked 3/11, 2016 at 4:5

2

Solved

I'm building simple angular application. There are two modules as student and teacher. Here is how my project organized. First when the user enters the application, I let them choose whether they ...
Herl asked 4/11, 2018 at 16:22

1

I need to send a configuration (array of objects) to a service in a feature module and this configuration needs to be dynamically calculated. I used forRoot and it worked fine until I've built it w...
Finesse asked 2/5, 2018 at 9:18

2

Well, I'm structuring my project following the infrastructure of: Feature module. Core module. Shared module. But there's something that I still don't have clear enough. As far as I know, the ...
Gee asked 9/5, 2018 at 20:38

1

I am trying to create a popover on my Home Page.So I have created following function.. public presentPopover(myEvent) { let popover = this.popoverCtrl.create(TestComponent); popover.present({ e...
Faludi asked 22/11, 2017 at 19:11

4

I am just starting to learn Angular. I have come across several examples using ngModule decorators over an empty class. What I want to know is... Is the class declared directly below the ngModule...
Sidras asked 7/10, 2016 at 6:57

1

Solved

I'm working with a rather large Angular application and currently have all shared components and modules inside a Shared Module which I import whenever I need anything which it exports. However I ...
Chantilly asked 18/10, 2017 at 6:12

2

Solved

I'm building a project based on angular2 (angularcli generated), webpack, scss, and module oriented. For http request I decided to create a Service that is used by an Authentication service. All...
Heriberto asked 22/6, 2017 at 13:14

3

My app has components that use a heavy-weight external package (ag-grid, about 1MB) that is provided as an angular2 module (AgGridModule). I would like to load this package only when the components...

2

We have made an attempt at moving our Angular 2 app (written by a friend of ours, thus we might not know all the details) into Ionic 2. However, we haven't managed to make it work yet, thus questio...
Avogadro asked 10/2, 2017 at 21:15

1

Solved

I am getting the following error "Can't bind to 'ngSwitchWhen' since it isn't a known property of 'template'." I've read different topics where it was advised to add import { CommonModule } fro...
Octofoil asked 10/3, 2017 at 13:5

1

Below is my initial code to create dynamic module: protected createComponentModule(componentType: any) { @NgModule({ imports: [ ComponentModule ], declarations: [ componentType ], }) cl...
Glamorous asked 2/3, 2017 at 9:24

1

Solved

I try to import FromGroup, FormBuilder and FormControl to my CustomModule: import { FormsModule, FormGroup } from '@angular/forms'; @NgModule({ imports: [ FormsModule, FormGroup ] }) But it...
Machiavellian asked 26/10, 2016 at 12:38

1

Solved

I've been trying to create an @NgModule (named ModelsModule) made of objects like User, Book, Library, Movie, and so on. Doing this I'm trying to not to import every object every time I need it but...
Storey asked 26/10, 2016 at 10:7

3

Solved

So I'm using Angular 2 final (2.0.0) and let's say i create a WidgetsModule with a bunch of directives and components that will help me build my application, and then import it in my AppModule imp...
Serranid asked 7/10, 2016 at 20:39

2

Solved

I have a shared component called GoComponent that I want to use in 2 modules: FindPageModule and AddPageModule. When I add it in the declarations of "FindPageModule" and in my "AddPageModule" I ge...
Isauraisbel asked 8/10, 2016 at 0:9

2

Solved

I'm wondering if it's better to create one single module that contains all my angular 2 code or if it is better to split everything across multiple modules. For example, I'm creating my blog with A...
Shena asked 28/9, 2016 at 19:34

© 2022 - 2024 — McMap. All rights reserved.