Questions tagged [angular15]

For questions regarding Angular specific to version 15. Please include all relevant tags on your question; e.g., [Angular], [TypeScript], etc.

342 questions
4
votes
1 answer

How to implement Angular AuthGuard that uses CanMatchFn and CanActivateFn? (How to convert Class Guards to Functional Guards)

I have the following Angular AuthGuard: @Injectable({ providedIn: 'root', }) export class AuthGuard implements CanActivate, CanLoad { constructor(private authService: AuthService, private router: Router) {} canActivate( next:…
Lorraine R.
  • 1,545
  • 1
  • 14
  • 39
4
votes
1 answer

Having karma tests outside src folder in angular 15 project

I've had karma test spec files outside the src folder in a test folder on the root level of the project. After updating angular from 14 to 15, karma needs the test spec files to be in whatever folder the sourceRoot says in the angular.json file. //…
4
votes
2 answers

Angular v15 npm run test fails in CI/CD machine with error "Uncaught TypeError: __webpack_require__(...).context is not a function"

After updating Angular from v14 to v15, I saw Angular CLI remove lines from the src/test.ts file. The lines were: declare const require: { context(path: string, deep?: boolean, filter?: RegExp): { (id: string): T; keys():…
kana op
  • 61
  • 7
3
votes
0 answers

Angular 15 ng serve error with ANIMATION_MODULE_TYPE

As the title says. I've been struggling with this error for hours. Like 30 files print this when I try ng serve: ./node_modules/@angular/material/fesm2020/button.mjs:239:156-177 - Error: export 'ANIMATION_MODULE_TYPE' (imported as…
3
votes
1 answer

Accessing DOM data from browser console in Angular 15 (with __ngContext__ no longer storing it)

I wrote a chrome extension to add some functionalities to a third-party website written in Angular. In order to read values (e.g. from textboxes), my javascript code would select the DOM item and read the ngContext property to extract the…
thezucc
  • 111
  • 1
  • 2
  • 3
3
votes
0 answers

Is LazyLoading broken in Angular ? ChunkLoadError: Loading chunk xxx failed

Having the following in the app-routing.module.ts of my Angular 15 application: import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { AuthorizationGuard } from…
serge
  • 13,940
  • 35
  • 121
  • 205
3
votes
1 answer

Angular 15 - FormsBuilder - TypeError: Cannot read properties of undefined (reading 'group')

I migrated my project to Angular 15 and can no longer directly use the FormsBuilder for Reactive Forms. I get an undefined exception: ERROR Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'group') TypeError:…
3
votes
2 answers

Appearance standard property not working in Angular 15

The appearance="standard" property in Angular 15 is not working anymore. All appearances are working well except standard. Why is this not working anymore? Result: Needed:
Hamdi
  • 41
  • 1
  • 5
2
votes
2 answers

Problem while updating angular 8 to angular 16. Error: Cant bind to "something" since it isn't a known property of "something"

I am updating an old angular 8 project to angular 16. I have updated the project. But now compiling the project is giving me multiple error on components "Cant bind to "something" since it isn't a known property of "something",where "something" here…
2
votes
3 answers

How to use Quilljs Editor in Angular 15 Project

I have trouble integrating a quilljs editor in my angular 15 web project. I firstly installed the dependencies with the following commands, which worked fine: npm install ngx-quill@latest npm install quill --save I tried importing it in my…
EndrIT
  • 65
  • 9
2
votes
0 answers

Angular "strictTemplates": true in tsconfig.json disable angular forms

After setting strictTemplates to true in my tsconfig.json, my Angular forms stopped working. My angularCompilerOptions configuration: "angularCompilerOptions": { "fullTemplateTypeCheck": true, "strictInjectionParameters": true, …
2
votes
1 answer

Upgrade from Angular 14 to 15 gives me build errors

This is currently my logging from an Angular build: ./angular/polyfills.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js): Error: Found non-callable @@iterator ./angular/main.ts - Error: Module build failed…
2
votes
1 answer

Undefined mixin error when defining a material theme with Angular 15

I updated my project to Angular 15 (15.2.1) and use the latest Material Design package (15.2.1) as well. When defining the theme like described in the documentation I get the error: ./src/styles.scss - Error: Module build failed (from…
Manuel S.
  • 120
  • 1
  • 13
2
votes
1 answer

NullInjectorError: No provider for HttpBackend

enter image description here error enter image description here main.ts enter image description here app-config-service.ts after i replaced bootstrapModule with bootstrapApplication in main.js and moved all providers in app-module to main.ts. i got…
mahbub kh
  • 41
  • 5
2
votes
2 answers

I want to download angular v14 but I get angular v15

I want to download angular v14 but I get angular v15 (ps: I have already tried npm install -g @angular/cli@14) npm install -g @angular/cli@14 i got version 15 still
1
2
3
22 23