16
questions
22
votes
1
answer
11k
views
How to import a NgModule library with forRoot() to an Angular standalone component?
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 import ...
15
votes
3
answers
16k
views
Use @ngx-translate in standalone components in Angular 17
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(loader)
...
2
votes
3
answers
2k
views
Is there a way of providing the common module in all modules in Angular StandAlone?
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',
...
2
votes
1
answer
6k
views
keycloak-angular with AngularElements and Standalone Component (no Authorization Header added to requests)
I have an angular app (and a nestjs backend) and I try to handle user login with the help of keycloak. As the buzzword rich question title states I have kind of a "weird" architecture.
I ...
24
votes
4
answers
22k
views
Unexpected synthetic property @transitionMessages found with standalone compoent angular 15
I am migrating the angular application to the standalone component. Removed the ngModule and app.module.ts file
main.ts
bootstrapApplication(AppComponent,{
providers:[importProvidersFrom(...
22
votes
6
answers
20k
views
NullInjectorError - Root standalone component does not import HttpClientModule properly
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 ...
7
votes
3
answers
9k
views
TypeError: Cannot read properties of undefined (reading 'ɵcmp') Angular
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 './...
6
votes
1
answer
6k
views
Angular 15 Ref Error: Cannot access 'Component A' before initialization
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....
2
votes
1
answer
1k
views
Angular dynamic module federation NullInjectorError when importing a standalone component with dependencies
I am trying to create the shell application as a dashboard with no routing, where I display multiple cards and the card content would be the remote (the microfrontend standalone component).
I have ...
2
votes
2
answers
262
views
Error: Can't bind to 'routerLink' since it isn't a known property of 'a'. with standalone component in Angular 15
I have a standalone component called home, but I am not able to have dynamic routerLinks in it even if I have imported RouterModule in my [imports] of my component. I do not have ngModules in my app ...
1
vote
1
answer
1k
views
TypeError: Cannot read properties of undefined (reading 'ɵcmp') in Angular 18
I'm trying to make the sorting of table work for /users that is defined in UserListComponent. The sorting functionality was broken by introducing NavbarComponent.
I tired to switch to standalone ...
1
vote
1
answer
2k
views
Angular 18 component is imported as non standalone component but fails to render
How to wire correctly NavbarComponent into the template of app component?
app.component.html
<app-navbar></app-navbar>
<router-outlet></router-outlet>
main.ts
import {...
1
vote
1
answer
395
views
Angular 17: select correct ElementRef of children component on mouseover event
I am constructing draggable and resizable elements in a circumscribed area.
When I hover these elements I dynamically apply sensitive dots (red squares) over them so that I can also perform resizing.
...
1
vote
2
answers
4k
views
Component imports must be standalone components, directives, pipes, or must be NgModules while importing an NgModule
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.
...
1
vote
1
answer
3k
views
Importing the BrowserModule into a standalone Angular16 project
Angular 16 is recently released and I have created a new standalone project without any module.
then in a standalone component I need to import BrowserAnimationsModule from angular/platform-browser/...