angular-module Questions
5
Solved
I have a custom pipe named CurrConvertPipe
import {Pipe, PipeTransform} from '@angular/core';
import {LocalStorageService} from './local-storage';
@Pipe({name: 'currConvert', pure: false})
export...
Hellen asked 3/3, 2017 at 10:28
5
Solved
I created an internal directive in a module in my project (Angular 8 + Material Design). Following tuto and official doc.
@Directive({
selector: '[button-confirmation]'
})
export class ButtonConf...
Extramural asked 23/8, 2019 at 12:35
1
I have implemented lazy loading in my application. One of my services needs to include DecimalPipe.
service --> shared module --> App module
This is my structure. I've already included "CommonMod...
Maecenas asked 7/10, 2019 at 21:52
2
Solved
I have an Angular Workspace created with three projects. As well as I have just created a Library that I would like to have reusable modules inside.
Typically for the projects (applications and li...
Ssm asked 2/1, 2019 at 16:22
6
Solved
I am trying to understand Angular (sometimes called Angular2+), then I came across @Module:
Imports
Declarations
Providers
Following Angular Quick Start
Directional asked 21/8, 2016 at 9:51
2
Solved
I am new to angular,
started writing my first library, containing components, services, directives.
i listed my components, services, directives in the library's exports array, but still:
Wh...
Whereby asked 20/11, 2019 at 15:55
2
Is there anyways to prevent a service from being injected outside of its original module?
Say that we're loading the projects.module.ts lazily and ProjectsModule is importing the ProjectsStoreModu...
Hoyos asked 17/10, 2019 at 22:22
2
Solved
I have the following app structure in my Angular 7 app:
AppModule
DashboardModule
DashboardChild1
DashboardChild2
DashboardChild3
DashboardService
AdminModule
AdminChild1
AdminChild2
AdminC...
Sholeen asked 6/1, 2019 at 23:49
1
Solved
I've been reading the documentation but still seem to be confused on when you should use a directive or a component...
Also, when is it best to abstract components and place them into modules??
Mesozoic asked 8/5, 2019 at 18:50
3
Solved
I've a custom decimal format pipe that uses angular Decimal pipe inturn. This pipe is a part of the shared module. I'm use this in feature module and getting no provider error when running the appl...
Interlineate asked 19/9, 2017 at 12:2
0
We're well aware that there are various ways of setting config for imported modules. We have '.forRoot()', 'useValue', 'useClass' and such to be used in the importing module.
Say for example, we w...
Aseity asked 16/1, 2019 at 3:8
3
Why should we bother using import { DOCUMENT } from '@angular/common'?
Even without it I can access the document module
document.getElementById('TestID).focus()
The only difference I see with t...
Lighten asked 23/8, 2018 at 18:23
3
Solved
I want to use this custom route reuse strategy for just one module:
export class CustomRouteReuseStrategy extends RouteReuseStrategy {
public shouldDetach(route: ActivatedRouteSnapshot): boolea...
Connected asked 2/7, 2017 at 22:10
1
I'm trying to implement wildcard modules and i don't seem to get it work:
Right now i have the following code which works:
typings.d.ts
declare module "*.json" {
const value: any;
export defau...
Demantoid asked 17/9, 2018 at 18:20
2
Solved
I don't understand the difference between router-outlet and module's exports array compilation strategies.
router-outlet will auto generate component by ComponentFactoryResolver
if you are not us...
Franklinfranklinite asked 17/6, 2018 at 9:2
1
Solved
In Angular 5, if I had AbstractClassService and ExtendedClassService that extends the abstract, I could do this in my NgModule's providers array:
@NgModule({
providers: [
{provide: AbstractClass...
Padlock asked 23/5, 2018 at 13:14
1
Solved
Having some questions regarding the lifetime of Angular services. My current understanding is that if you inject the service into a component, and the service is provided in the providers array of ...
Alee asked 5/5, 2018 at 10:31
2
Solved
I'm new in angular and I was wondering if it's possible to load and module and its components I made based on a conditional on the app.module or where would it be the best place to do this.
Basica...
Inkerman asked 10/4, 2018 at 21:5
2
Solved
I can't make the directive work in a lazy loaded module. I've read the documentation and I simply added the directive into declarations array of my main module. The directive works as expected at t...
Nysa asked 2/1, 2017 at 21:56
2
Solved
I have an app which has multiple views like navigation and pages. So I added a layout module and imported that module to the main module & now trying to use layout modules navigation component ...
Spiffy asked 20/2, 2018 at 20:21
1
Solved
The problem is that I'm calling a function inside forRoot method like this:
app.module.ts
import {environment} from '../environments/environment';
...
@NgModule({
imports: [
BrowserModule,
M...
Laguna asked 12/1, 2018 at 12:6
1
Solved
I am trying to import a locally developed Angular project/module into an angular application without publishing it into npm repository.
First, I followed this tutorial to build my module in UMD fo...
Behistun asked 5/1, 2018 at 1:44
4
Solved
I have made a custom angular2(5.0.x) module that looks like this :
import { GuageService } from './services/guage.service';
import { NgModule } from '@angular/core';
import { CommonModule } from '...
Corkscrew asked 16/11, 2017 at 13:40
0
I have been trying to dynamically load an external angular module (AppA) into another angular application (AppB) at runtime.
AppA is created with angular-cli, compiled with ngc and packaged with r...
Jannjanna asked 15/11, 2017 at 16:2
2
Solved
I have created a small component (LoadingComponent) in the root of my application and declared it (obviously) in my AppModule. This component is used when my application is loading and should show ...
Toehold asked 1/9, 2017 at 10:55
© 2022 - 2024 — McMap. All rights reserved.