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
-1
votes
1 answer

Angular application is not loading my component path when manually navigated to in the browser

My application starts on a login page which has a button to a create-account page. If I am on the create-account page and I refresh my browser, it goes back to the login page. Why is that? I tried reading through the documentation to find a…
Alexandru
  • 12,264
  • 17
  • 113
  • 208
-1
votes
1 answer

'mat-expansion-panel' is not a known element

I'm currently using this Angular module Material Expansion Panel, it's working fine on local but when I try to build it in prod, it throws me this error : 'mat-expansion-panel' is not a known element: 1. If 'mat-expansion-panel' is an Angular…
Skairipa
  • 13
  • 4
-1
votes
1 answer

"Can't bind to 'ngModel' since it isn't a known property of 'input' "

My project was completely running fine but I don't how, when, Where What happened that it's giving error Can't bind to 'ngModel' since it isn't a known property of 'input' and also If 'mat-error' is an Angular component, then verify that it…
-1
votes
3 answers

Importing node modules once for whole project

Scenario So, I have initialised a Node project with npm. I have setup my package.json accordingly. I am using typescript, so I have also setup tsconfig.json. I have a few dependencies (npm packages) that I will need to use multiple times in multiple…
-1
votes
3 answers

Create a new NgModule that exports and includes

I'm working on ionic 3. My project is working correctly, but whenever I tried to build an Android release I'm facing this error.
Abdul Rehman
  • 3
  • 1
  • 2
-1
votes
2 answers

I don't understand Angular NgModules

I went into few videos explaining NgModules and the official Angular documentation about NgModules but I'm still having a grasp about how it works. I understand that components goes into declarations, modules into imports and services into…
KevinTale
  • 1,658
  • 3
  • 25
  • 47
-1
votes
3 answers

Angular 2/4: Is it possible to encapsulate classes in a NgModule?

I have several classes that I would like to include in a module, so I can then just import the module, as it was a different package, and use those classes from it. Here's a small example: human.ts (my class file) export class Human { private…
leota
  • 1,636
  • 2
  • 13
  • 33
-1
votes
1 answer

Angular 2 DI - Can't resolve all parameters

I've build a basic app in Angular 2, and cannot inject a service into one of my components through a module. After compiling with webpack i get this following Error: "Angular 2 DI - Can't resolve all parameters" // UserModule import {NgModule} from…
1 2 3
14
15