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

LazyLoading and config angular NgModule

I have a module 'DevicePreview' that have some routes and can be displayed both from root and from inside another module 'Content'. When called from root DevicePreview has routes /a, /b and /c available, when called from Content it has /a, /b and…
subarroca
  • 851
  • 7
  • 22
0
votes
1 answer

Using component encapsulated in a module from other module in angular 4

I am developing an angular 4 app and I have two modules, the first module encapsulate some features that I need to use in others modules. For example I have the first module called SRModule I have imported SrCrComponent component: import { NgModule…
xzegga
  • 3,051
  • 3
  • 25
  • 45
0
votes
1 answer

Component directives and NgModule

I am trying to split a component I have in three. So I created a new component, template, etc... Now I need to include the children components into the main component in order to make children selectors work. I learned that component directives is…
fred00
  • 571
  • 2
  • 8
  • 23
0
votes
0 answers

Updation of a shared object that is created inside factory method of a module is not updating in another module in Angular JS

Hello I am a beginner in Angular JS and now I am stuck into something. I have made two modules Menu and Canvas Now I have declared a object inside the factory method of Menu module to make it available from Canvas module. My code is as follow; var…
KOUSIK MANDAL
  • 2,002
  • 1
  • 21
  • 46
0
votes
0 answers

Can't bind to 'valueToPass' since it isn't a known property of 'app-departments'

I have an issue with Angular2 project. I have two components, Departments component and Full-Layout component. I'm trying to pass data from Full-Layout component to Departments by using Input(). full-layout.component.ts import {Component, OnInit}…
0
votes
1 answer

Core Module's Directive Confusion of Service Usage

I've got a core module named CoreModule, it contains a service named MapManagerService, directive named FlyToDirective which uses the MapManagerService, and a component named ElementComponent which uses the the flyTo. My AppModule imports the…
Kesem David
  • 2,135
  • 3
  • 27
  • 46
0
votes
1 answer

Angular 2 : How to reuse common code for other apps to use?

Need suggestions on how to reuse common code across angular apps. We started developing an app with angular2 for some specific needs but at a later point realized that more apps will follow and try to reuse ALL or ONE of the common services and…
0
votes
1 answer

Which criteria decides how to map modules to components for Angular2?

How modules are distributed on components. and what are the advantages of this new concept over simple folder organisation ? Options: One module per component ? One module per page. Other ...
user2080105
  • 1,642
  • 4
  • 18
  • 27
0
votes
1 answer

ionic2 // Can't use my module in a page component

I'm upgrading my application from the beta.11 to the RC3. But I have a problem with a component I used in the beta.11 version. Basically, I created a modular component "MyMessage", which is a angular2 component (and not a NgModule). I use this…
Julian Le Calvez
  • 453
  • 7
  • 27
0
votes
1 answer

FormGroup binding error in Angular2

Please, I'm stuck here guys ; I've got this error a day later and it is driving me crazy while developing an Angular2 application (stable version) : Error: Template parse errors: Can't bind to 'FormGroup' since it isn't a known property of 'form'.…
SeleM
  • 9,310
  • 5
  • 32
  • 51
0
votes
1 answer

Do app.module providers and components share the same instance of an Injectable?

When I add the injectable CameraChannelService into ngModule's provider array: import { CameraChannelService } from './camera-channel.service'; @NgModule({ declarations: [ AppComponent, BabylonWallpaperDirective, MenuComponent, …
0
votes
1 answer

NgModule installing its own routes

I am trying to figure out how to empoy @NgModule to better organize an Angular 2 modular app. In particular, I am interested in an NgModule installing its own routes into the app. Does anyone have a working example showing how to go about it?
user776686
  • 7,933
  • 14
  • 71
  • 124
0
votes
1 answer

How to use ng2Modules inside a project

I have a shared module in my app, I bundled all my components from the shared folder in a single module. What I need now is how do I import classes from that module? import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import {…
Nicu
  • 3,476
  • 4
  • 23
  • 43
0
votes
2 answers

Property does not exist on type typeof app.module

import { StoreModule } from "@ngrx/store"; import { currentPurchase } from "../shared/index"; @NgModule({ imports: [ IonicModule.forRoot(MyApp, {}), HttpModule, StoreModule.provideStore({currentPurchase}) ] .. I am…
Stephan Kristyn
  • 15,015
  • 14
  • 88
  • 147
0
votes
1 answer

Error from a feature module build in Angular 2, regarding the scss file declared in styleUrls array

This is the NgModule of my feature module: @NgModule({ imports: [ CommonModule, FormsModule, ReactiveFormsModule ], declarations: [ CustomCardComponent, StyledDirective ], exports:…
Donovant
  • 3,091
  • 8
  • 40
  • 68
1 2 3
14
15