Questions tagged [ng-modules]

Angular NgModule is a class marked by the @NgModule decorator.

NgModules configure the injector and the compiler and help organize related things together.

An NgModule is a class marked by the @NgModule decorator. @NgModule takes a metadata object that describes how to compile a component's template and how to create an injector at runtime. It identifies the module's own components, directives, and pipes, making some of them public, through the exports property, so that external components can use them. @NgModule can also add service providers to the application dependency injectors.

Resources

218 questions
0
votes
1 answer

Bind angular mat-checbox ngModule

I have an Array of mat-checbkox, where user can only select one option: export enum ProjectStatus { Ready = "Is ready", Testing = "is testing", Done = "is done" }
Arnau Bosch
  • 73
  • 1
  • 8
0
votes
1 answer

LeafletModule could not be resolved to an NgModule class in Ivy

I'm developing an angular project with ngx-leaflet. After running ng serve in the console, the following error appears: Error: node_modules/@asymmetrik/ngx-leaflet/dist/leaflet/leaflet.module.d.ts:1:22 - error NG6002: Appears in the NgModule.imports…
Siebe
  • 305
  • 1
  • 3
  • 10
0
votes
1 answer

How to export functions in shared.module?

I have the following function: export function toCamelCase(string): string { //code omitted } Then I use it on my feature components by adding reference as: import * as utility from '../shared/functions/helper-functions'; However, I use a shared…
Jack
  • 1
  • 21
  • 118
  • 236
0
votes
1 answer

Angular environment files do not get swapped in time

I am using Angular 9, View Engine compiler. I have 2 files where I store environment values: environment.ts: export const environment: any = { production: false, }; environment.prod.ts: export const environment: any = { production:…
0
votes
1 answer

Angular NgModule Documentation Confusion

I am confused by the following documentation related to components vs services from other modules. https://angular.io/guide/sharing-ngmodules#using-components-vs-services-from-other-modules I understand what the documentation is stating that typical…
Fergal Rooney
  • 1,330
  • 2
  • 18
  • 31
0
votes
1 answer

How correctly declare component on NgModule for it could be visible in Routing module?

I try to structure my project, and I separate main bar of my application from app.module (here it is): import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from…
0
votes
1 answer

PrimeNg ConfirmationService - Error NG6002

I'm building my Application Form and need a confirmation pop-up to use. but I'm getting a build error - error Ng6002 - Appears in the NgModule.imports of appModule, but could not be resolved to an NgModule class. export declare class…
Saher
  • 105
  • 1
  • 13
0
votes
2 answers

Angular Circular Reference with Error Handler

I am moving functionality to feature modules, and ultimately lazy loading. Conventional wisdom indicates that app-wide singleton services should be provided in a Core module, which is loaded only once, by the Root module (see…
FunkMonkey33
  • 1,956
  • 2
  • 16
  • 24
0
votes
1 answer

Getting undefined value when using ngModel and ngValue Angular 4 and JHipster

What the Application should do: I'm working on a Web-Application using JHipster and Angular 4. I want to make a select option where the user can choose between options displayed using ngModel and ngValue. The chosen value should then be displayed in…
matsch
  • 281
  • 4
  • 14
0
votes
3 answers

ngModel and ngFor select options

Im doing a form that changes with selected option.