ionic-team / starters

Starter templates for Ionic apps, used by the Ionic CLI
MIT License
460 stars 315 forks source link

Sidemenu starter fails with typescript error #1743

Closed IsaacSomething closed 1 year ago

IsaacSomething commented 1 year ago

Starter Type: angular Starter Template: sidemenu

Description: The initial build fails with the typescript error

Error: src/app/folder/folder.page.ts:15:5 - error TS2322: Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.

this.folder = this.activatedRoute.snapshot.paramMap.get('id');

My ionic info:

Ionic:

   Ionic CLI                     : 6.20.4 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.3.6
   @angular-devkit/build-angular : 14.2.9
   @angular-devkit/schematics    : 14.2.9
   @angular/cli                  : 14.2.9
   @ionic/angular-toolkit        : 6.1.0
typescript:
"typescript": "~4.7.2"

Other Information: A fairly simply fix

public folder!: string | null;

sean-perkins commented 1 year ago

Thank you for reporting this issue! This has been addressed in #1744.