angular-standalone-components Questions
3
In every component I have to import this CommonModule to use directives like NgIf and so on.
I want a way of injecting this module in all my modules.
@Component({
selector: 'app-register',
stand...
Richardson asked 2/2 at 11:36
5
Solved
I have an issue, I want to rewrite my app code and change main module to main root standalone component pointed in main.ts.
All works fine but I have an issue with HttpClientModule. I am using Http...
Indian asked 9/3, 2023 at 22:14
2
Solved
I'm trying to import an NgModule into a standalone component but the compiler is throwing the error NG2012 : Component imports must be standalone components, directives, pipes, or must be NgModules...
Gable asked 8/1, 2023 at 11:57
4
Solved
This is not the usual module-related issue. Because I'm using Angular v16, standalone component, no module is required.
TS
import { FormBuilder, FormGroup, FormControl, Validators, FormsModule } fr...
Particulate asked 31/7, 2023 at 17:56
4
I need to migrate the component/view below (with nested routes) from NgModule to standalone
Angular docs for routing do not mention standalone, and standalone docs only show how to route to a stand...
Thumping asked 4/10, 2023 at 16:28
3
Solved
Is it possible to use Ngxs in a standalone component? I've tried importing the NgxsModule in the following ways:
@Component({
...
imports: [
...
NgxsModule.forFeature([MyState]),
...
and
@Comp...
Wreckage asked 23/10, 2022 at 0:16
2
I've some modules that I want to globally use everywhere in my app, so I don't want to have to declare them in every components.
Currently, I've to do the following:
@Component({
selector: 'app-bl...
Nonviolence asked 8/3 at 16:39
2
Solved
I use standalone components in Angular 17. When I used module architecture, I didn't have this problem. I added it to import in AppModule and it works good.
imports: [
TranslateModule.forRoot(load...
Quail asked 4/1 at 18:40
5
Solved
I am migrating the angular application to the standalone component. Removed the ngModule and app.module.ts file
main.ts
bootstrapApplication(AppComponent,{
providers:[importProvidersFrom(FalconCor...
Bailiff asked 19/1, 2023 at 13:11
4
Solved
I updated my angular project to angular 14. Now I want to have some standalone components, pipes, or directives.
I have a featured module named ProductModule and want to use a standalone pipe calle...
Allometry asked 13/10, 2022 at 11:39
3
Solved
I have created a custom ui library using only standalone components and here's my public-api.ts file.
/*
* Public API Surface of ih-ui-lib
*/
export * from './lib/ui-lib.service';
export * from ...
Hostile asked 5/9, 2023 at 6:34
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...
Fix asked 12/7, 2023 at 14:31
0
Hello I have a problem with the standalone components since I switched to the default builder working but impossible to access the site so I use the new builder in esbuild test and with it it final...
Geld asked 27/9, 2023 at 9:10
3
Solved
Before in ngModule base angular application you use to add MsalRedirectComponent in the bootstrap property of AppModule :
bootstrap: [AppComponent, MsalRedirectComponent]
Now in V15.2 the AppModul...
Otter asked 14/3, 2023 at 10:51
1
Solved
I am using Angular v16 with standalone components. I implemented InMemoryWebAPI as I have in NgModule-based projects, but it doesn't seem to be working. I keep getting 404 not found.
Anyone try thi...
Glazing asked 7/6, 2023 at 21:53
1
Solved
I am facing one issue while importing standalone component within each other.
Component A.
@Component({
standalone: true,
selector: 'app-a',
templateUrl: './a.component.html',
styleUrls: ['./a....
Altaf asked 12/5, 2023 at 5:18
1
Solved
The imports attribute is available on the @Component decorator but not on the @Directive decorator.
Is there another way to import a module into a standalone directive ?
Phago asked 14/2, 2023 at 8:8
2
I'm trying to write a unit test for a standalone component and mock its dependency. This standalone component has the following content:
import { Component, OnInit } from '@angular/core';
import { ...
Sarad asked 12/12, 2022 at 10:13
1
© 2022 - 2024 — McMap. All rights reserved.