Questions tagged [angular-standalone-components]

58 questions
0
votes
0 answers

Standalone components in Angular doesn't load in router

Alright, today I tried to implement standalone components in my app. Just to investigate how it works. So on initial launch it's loading correctly. But, here is the thing. Here I have a regular component with navigation and router-outlet. and here…
0
votes
1 answer

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 want to create a custom element with the help of angular…
0
votes
2 answers

'ngModel' cannot be binded to 'ion-input'

I am using ionic 7 with angular to build social app and I want to use two way binding to get the data from the input field but ngModel is not recognise Here is the html content:
0
votes
0 answers

Router-outlet does not work on page load (Angular 15 standalone root component)

Router-outlet does not load a component on page load/refresh. I have not found any solution in the internet. Any ideas? Have a Console error (see 1st comment). main.ts import { bootstrapApplication } from '@angular/platform-browser'; import {…
0
votes
0 answers

Angular 15 standalone app component does not load router-outlet on page refresh (only if I click menu item)

I have migrated my web app from 9 to angular 15 and did all components standalone. But on the final step got an issue, when I did my app root component standalone. Now after page refresh or initial load the router-outlet does not load component.…
0
votes
0 answers

Enabling Treeshaking for ngx-echarts in angular 15

I'm trying to use treeshaking for ngx-echarts in angular 15 standalone component. I followed the docs, but treeshaking doesn't seems to work. Can anyone help in this. I have tried both custom build and treeshaking build suggested by the…
0
votes
0 answers

insertAfterLastOccurrence (/Users/san/project/Sample/fetebird-ui/node_modules/@nrwl/workspace/src/

I have created an NX micro-frontend application in angular. Since using the Angular 15 standalone component, trying to set up the NGRX with the below reference https://nx.dev/recipes/other/standalone-ngrx-apis nx g @nrwl/angular:ngrx --root…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
0
votes
1 answer

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. NgModule({ declarations: [FooComponent], …
Matthieu Riegler
  • 31,918
  • 20
  • 95
  • 134
0
votes
0 answers

How to transfer the value of an array between components SAC [Angular 15]

I'm looking to transfer the value of an array between two components. My application is a basic crud application that will store accounts with an id, name and date. I have a service that has 2 basic functions and an array to pull from - The array is…
0
votes
0 answers

Angular 14 standalone component throws: missing @NgModule annotation error

I want to switch from SCAM to angular standalone component design. I started by creating a new component but I keep getting the the error: class ExpansionTableComponent Appears in the NgModule.imports of SMVHistoryComponentModule, but could not be…
0
votes
1 answer

RouterTestingModule.withRoutes in a test of Angular standalone component

After migrating to standalone components in Angular, how do we mock testing routes? Let's consider a component @Component({ standalone: true, imports: [RouterModule] template: ``, }) class FooComponent…
0
votes
1 answer

Angular Materials not functioning in Dynamically created standalone component in angular 14-15

When creating a dynamic standalone component at runtime the HTML renders in the ViewContainerRef but angular materials does not work with the exception of MatIcon. Please see the example of code const compMetadata = new Component({ …
-1
votes
1 answer

Angular service to transfer data between components (standalone components - NG14)

I know we can use a service, @Input and @Output so move data between components. For example I can have this in a service: @Injectable() export class MyService { myMethod$: Observable; private myMethodSubject = new Subject(); …
1 2 3
4