For questions regarding Angular specific to version 14. Please include all relevant tags on your question; e.g., [Angular], [TypeScript], etc.
Questions tagged [angular14]
536 questions
5
votes
0 answers
Difference between UntypedFormControl and FormControl #Angular14 #AngularMigration
I recently migrated from Angular12 to Angular14, Angular automatically converted FormControl to UntypedFormControl in some places. I observed that in some components where I am using FormControl it is still written as FormControl. So I am bit…

Chinmay Yogi
- 51
- 1
5
votes
3 answers
Problems after Angular Material update from 14 to 15
I'm working on an Angular project, updated from angular14 to 15, but after I install the new Material package the whole project seems visually broken. Wrong colors, margins, paddings.
The project only contains css style files, not scss. I think the…

bugesz
- 75
- 1
- 7
5
votes
2 answers
Angular 14 pathMatch Type 'string' is not assignable to type '"full" | "prefix"' Error
Just upgraded to Angular 14, getting error:
Types of property 'pathMatch' are incompatible.
Type 'string' is not assignable to type '"full" | "prefix"'.
Calling from:
import { Routes as routes } from './routes';
@NgModule({
imports: [
…

paulrusu
- 117
- 1
- 7
5
votes
2 answers
You may need an additional loader to handle the result of these loaders. Angular 14
I updated from Angular 7 to Angular 14 after removing all the errors in my project this is the only error that is stopping me from compiling successfully. I am getting this error on ng serve:
/src/app/shared/styles/themes/theme-f.scss:1:6 - Error:…

Sana T.
- 69
- 1
- 6
5
votes
2 answers
Module parse failed: Unexpected token (4:0)
I'm trying to add FULLCALENDAR to my Angular v14 project.
But after all setup suddenly I'm facing this error
Any idea how to deal with this error?
package.json
"@fullcalendar/angular": "^5.11.0",
"@fullcalendar/daygrid":…

Biplab
- 71
- 1
- 7
5
votes
1 answer
Uncaught TypeError: Cannot read properties of undefined (reading 'document')
I am using nvd3 charts(nvd3-1.8.5, d3-3.5.17), facing the below issue after Upgrading from angular 12 to angular 14. When it was in angular 12 I didn't face any issues.
Uncaught TypeError: Cannot read properties of undefined (reading 'document')
…

Hemanth
- 61
- 5
5
votes
3 answers
Typed Form in Angular 14 shows `` instead of types
While being on the latest version of Angular (version 14), it seems that I am not doing something well and thus strictly typed reactive forms are not working as expected.
Form is initialized inside ngOnInit using injected FormBuilder.
public form!:…

Chaka15
- 1,105
- 1
- 8
- 24
5
votes
1 answer
NX workspace - angular 14 - jest not working
I'm trying to upgrade my angular 13 NX workspaces to angular 14, but somehow I can't get my jest unit tests to work properly. I tried the following from zero:
Install @angular/cli and nx globally:
npm install --global @angular/cli@latest
npm install…

Pieterjan
- 2,738
- 4
- 28
- 55
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
0 answers
How do I access a shared asset via Angular mdule federation?
I'm using Angular 14 and module federation. In my remote app, I have this file structure
- package.json
- webpack.config.js
+ src
- settings.json
+ app
+ services
- app.service.ts
In my app.service.ts file, I access a…

Dave
- 15,639
- 133
- 442
- 830
4
votes
1 answer
In Angular 14 how to add nonNullable to Form Control which has validations
form: FormGroup;
createMyForm() {
this.form = new FormGroup({
firstName: new FormControl('', [Validators.required]),
lastName: new FormControl('', { nonNullable: true }),
});
}
How to add { nonNullable: true }…

gbr
- 65
- 5
4
votes
1 answer
Property 'configureTestingModule' doesn't exist on type TestBedStatic
I have updated my Angular 12 application to Angular 14 using ng update. The build was successful and can see my application running perfectly fine but my tests are failing. One of the errors I am getting is this:
Property 'configureTestingModule'…

Aayushi Jain
- 2,861
- 2
- 29
- 36
4
votes
4 answers
properly understanding inject in angular14 - inject() must be called from an injection context
I'm trying to learn the changes in angular 14, especially the inject() feature where i'm able to inject modules to functions and i don't need to create special services for that.. but i think i got something wrong.
I'm trying to create some static…

ufk
- 30,912
- 70
- 235
- 386
3
votes
1 answer
Navigating back causes change detection to break in Angular elements
I am using Angular elements to use my components inside of custom ThingsBoard widgets. The elements are created inside ngDoBootstrap() like this:
const newCustomElement = createCustomElement(CustomElementComponent, {
injector:…

Chris
- 1,417
- 4
- 21
- 53
3
votes
1 answer
How to correctly use the Angular 14 inject function with multi: true?
I have a service with multiple instances, that I provide multiple.
{ provide: MyAbstractService, useClass: MyServiceA, multi: true },
{ provide: MyAbstractService, useClass: MyServiceB, multi: true },
For reasons I don't further want to name, I…

MoxxiManagarm
- 8,735
- 3
- 14
- 43