Skip to main content

All Questions

0 votes
1 answer
24 views

How to organize the code so it will allow me to replace the original parts of the app with custom ones when needed?

I have a remote repo with the code commonly used in projects. These are components, directives, pipes, services, and interfaces - everything you would use in a project. Right now they're registered ...
Chocho's user avatar
  • 81
1 vote
1 answer
74 views

Translate Pipe not correctly importing while using ngx-translate in Angular 18

I'm trying to use the ngx-translate library in Angular 18, but it gives me the following error message in the app.component.ts file when I try to use Translate pipe. I am trying to ultimately display ...
Anon's user avatar
  • 63
1 vote
1 answer
72 views

Overriding dependency directive after migrating to angular standalone components

I began migrating my angular 18 application to standalone components and I've run into issues overriding various imports. I'm using Angular 18, Material, NGMocks, Spectator (as testbed replacement) ...
Martinspire's user avatar
0 votes
1 answer
86 views

Angular 17: Standalone components and not a root service

How can I provide a service that is not at the root of the application, and use the same instance between several components and other services? Not using providers in routes and not using ng module. ...
Anatoly Surgutov's user avatar
0 votes
1 answer
30 views

Can standalone components handle nested ngModules?

How to correctly handle below scenario ? StandaloneComponent ( needs for example ReactiveFormsModule ) ModuleA ModuleB ( imports ReactiveFormsModule) If I got above structure reactive forms module is ...
ruddnisrus's user avatar
1 vote
2 answers
114 views

Angular two way binding broken in production build - TypeError "st is not a function"

I have a project that is using Angular 17, application builder, standalone components, with NgModule imports. In Development, it builds and runs just fine, but when building in Production, the ...
ZrSiO4's user avatar
  • 146
0 votes
2 answers
48 views

Router-outlet not loading first component as expected

On my new angular project I have the following app.routes.ts file: import { Route } from '@angular/router'; export const APP_ROUTES: Route[] = [ { path: 'main', loadComponent: () =...
joaovzg's user avatar
  • 50
1 vote
1 answer
107 views

Unit Testing Angular: Cannot read properties of undefined (reading 'ɵcmp')

I'm trying to develop a test for a component of an Angular (v18) application. The component is standalone and the file spec file is the autogenerated one, I added only the services that the component ...
Valentina Maronese's user avatar
1 vote
1 answer
79 views

How do I apply the `canActivateFn` to all routes in a standalone Angular application?

In module-based applications, to add a guard to all routes at once, i can pass it as the second parameter to the RouterModule.forRoot function. RouterModule.forRoot(routes, { canActivate: [AuthGuard] }...
Vlad's user avatar
  • 26
0 votes
1 answer
172 views

Ionic 8 with Angular 18 Standalone Component using innerHTMLTemplatesEnabled in Action Sheets for Custom HTML

I am using Ionic 8 with Angular 18 in a standalone project. I am trying to create an alert with custom HTML. Here is my TypeScript code: async presentAlert() { const alert = await this....
Ravi Gaud's user avatar
1 vote
1 answer
60 views

Angular 18.0.5 not seeing the interceptor and not working

I believe with standalone component and HttpInterceptor has a bug! export const appConfig: ApplicationConfig = { providers: [ // provideHttpClient(withInterceptorsFromDi()), // { provide: ...
Tonyfilho's user avatar
1 vote
1 answer
126 views

Angular Standalone - How to Inject Service into Service

I'm a longtime Angular dev now trying to learn the standalone version. How do I inject a service into another service without a providers array in the NgModule. Is my only choice using providedIn in ...
emery.noel's user avatar
  • 1,155
3 votes
1 answer
47 views

multiple feature state dispatching actions while routing

I am facing issue with NGXS in Angular 18 with almost all standalone components. I have applied lazy loading for components. While I am switching from roles page to users page it is dispatching/...
Hitesh Bariya's user avatar
1 vote
1 answer
82 views

How to get Chunk names for child components in a lazy loaded angular standalone v17 app without associating them with any routes?

I have a standalone components angular application running on v17.0.9 and using lazy loading to load all the components via loadChildren and loadComponent for the main layout component and other ...
HarshG's user avatar
  • 11
1 vote
1 answer
75 views

jest ReferenceError: Cannot access 'BsNavbarDropdownComponent' before initialization

I'm trying to convert my angular app (NX monorepo) to use standalone components. However when doing so, my Jest unit tests stop working and give the following error: ReferenceError: Cannot access '...
Pieterjan's user avatar
  • 3,465

15 30 50 per page
1
2 3 4 5
12