Questions tagged [angular13]

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

562 questions
6
votes
0 answers

Error [ERR_REQUIRE_ESM]: require() of ES Module node_modu les\@angular\core\fesm2015\testing.mjs not supported. Angular 13, Jest

After an upgrade to Angular 13, my Jest unit tests are failing and i cannot understand why and how to fix them. I´ve searched for a while now and i have found some info for similar cases. It seems the reason for such fails is a change in Angular 13…
6
votes
3 answers

Angular 13 Cannot find module '@angular/common/locales/fr.js'

I moved from angular 12 to angular 13 and I've had a new error. So basically I used to load the culture of the user by importing the locale file. const localeUri = `@angular/common/locales/${localeId}.js`; return import(localeUri).then((module) =>…
Yvan
  • 1,081
  • 2
  • 20
  • 27
5
votes
2 answers

How to properly implement Windows Authentication in an ASP.NET Core app with Angular

I just finished creating an ASP.NET Core app with Angular as described in this tutorial. When creating the ASP.NET Core project, I checked the option to enable Windows Authentication. As long as I add [AllowAnonymous] to my controllers in the…
Chris
  • 1,417
  • 4
  • 21
  • 53
5
votes
5 answers

proxy.conf.js not working in ASP.NET Core app with Angular

I am trying to setup an ASP.NET Core app with Angular frontend by following this tutorial. I was already able to successfully create the projects and I am also able to run and debug them flawlessly. The problem is that for some reason I cannot get…
Chris
  • 1,417
  • 4
  • 21
  • 53
5
votes
1 answer

Jest: Unexpected value 'NgxsRootModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation

I'm getting the following error when running a test in Jest, using Angular 13: Unexpected value 'NgxsRootModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation. 41 | 42 | beforeEach(() => { > 43 | …
eebsie
  • 396
  • 5
  • 18
5
votes
3 answers

The default Identity UI layout requires a partial view '_LoginPartial' error ASP.NET Core 6.0

So. I created a fresh new project with Visual Studio Pro 2019 (v16.11.9) using the model ASP.NET Core with Angular. I set the authentication option to Individual User Accounts. I got a working scaffolded project with Angular 8, ASP.NET Core 3.1…
5
votes
3 answers

Property binding error after updating to Angular 13

I'm getting this error Property binding ngIf not used by any directive on an embedded template. Make sure that the property name is spelled correctly and all directives are listed in the "@NgModule.declarations" Even thou it works fine when I run…
Ibrahim Ali
  • 2,083
  • 2
  • 15
  • 36
5
votes
3 answers

Module not found: Error: Package path ./locales is not exported from package after angular update to 13

TypeScript 2.4 added support for dynamic import() expressions, which allow us to asynchronously load and execute ECMAScript modules on demand. Trying to dynamically import the localize but facing the issue with export Module not found: Error:…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
4
votes
1 answer

require() of ES Module not supported, Change the require to dynamic import() which is available in all CommonJS modules

I am having trouble getting my Angular app started. I am getting the following error after running ng serve: An unhandled exception occurred: require() of ES Module…
M. Bal.
  • 43
  • 2
  • 6
4
votes
1 answer

Jest + kendo-angular-grid => Class constructor EventEmitter_ cannot be invoked without 'new'

I get an error while running my Jest test file: TypeError: Class constructor EventEmitter_ cannot be invoked without 'new' at new ZoneAwareEventEmitter (node_modules/@progress/kendo-angular-grid/dist/npm/common/event-emitter.js:16:28) at new…
MStephan
  • 131
  • 3
4
votes
2 answers

Running jest in angular13: Unexpected value 'TranslateModule' imported by the module 'DynamicTestModule'. Please add an @NgModule annotation

I have tests from an angular 12 project that work just fine. I've upgraded the project to angular 13 and now they don't work. This is my test file: import { Component } from '@angular/core'; import { ComponentFixture, fakeAsync, TestBed, tick,…
kim
  • 301
  • 6
  • 17
4
votes
1 answer

Angular's best practice for unassigned @Input() in typescript strict mode?

Context I recently upgraded to a newer version of Angular (I moved up, in three steps, from 10 to 13). One of the upgrade steps included a dependency on a new version of typescript, which "strict" compiler mode raises an error, if a declared…
Adriano di Lauro
  • 469
  • 4
  • 10
4
votes
2 answers

How do you get the module of a component that's been dynamically loaded in Angular v13?

In v12 you could use the following code to load/import a component dynamically, access its NgModule through ComponentFactory and then add it to the DOM using ViewContainerRef. const injector: Injector = /* injected */ const cfg:…
james
  • 4,150
  • 2
  • 30
  • 36
4
votes
0 answers

Angular 13 customize root path for lazy loaded chunks

I have multi - modular Angular 13 application, where modules are loaded using lazy - loading. The problem is that generated Angular files like main.[hash].js, pollyfils.[hash].js and runtime.[hash].js are located NOT at the site root. The structure…
4
votes
0 answers

Angular Compiler API replacement in Angular v13 for dynamic/runtime modules

We are using this function from the compiler compileModuleAndAllComponentsAsync to create a dynamic/runtime module. The compiler is deprecated in Angular v13. Does anyone have a similar ( dynamic/runtime module ) use case and has successfully…
zeljko_a
  • 3,725
  • 1
  • 22
  • 23
1
2
3
37 38