-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(spa): upgrade Angular to version 9.* #18956
Conversation
- project structure alignment with Angular CLI generated content, including location of the files and naming conventions - content update for configuration files - dependency listing changed - minor change in template to comply with hardened template type checks - minor change in authorization service to overcome problem with changed shape of types provided by 3rd party library used in templates (added fixme note). Addresses: dotnet#14076
details of errors fixes:
#2 linting error:
#3 compile time errors ( ERROR in src/api-authorization/authorize.service.ts:77:29 - error TS2345: Argument of type 'Profile' is not assignable to parameter of type 'IUser'. Property 'name' is optional in type 'Profile' but required in type 'IUser'.
77 this.userSubject.next(user.profile);
~~~~~~~~~~~~
src/api-authorization/authorize.service.ts:88:31 - error TS2345: Argument of type 'Profile' is not assignable to parameter of type 'IUser'.
88 this.userSubject.next(user.profile);
~~~~~~~~~~~~
src/api-authorization/authorize.service.ts:114:29 - error TS2345: Argument of type 'Profile' is not assignable to parameter of type 'IUser'.
114 this.userSubject.next(user && user.profile);
~~~~~~~~~~~~~~~~~~~~
src/api-authorization/authorize.service.ts:149:42 - error TS2339: Property 'data' does not exist on type 'SignoutResponse'.
149 return this.success(state && state.data);
~~~~
src/api-authorization/authorize.service.ts:194:5 - error TS2322: Type 'Observable<Profile>' is not assignable to type 'Observable<IUser>'.
Type 'Profile' is not assignable to type 'IUser'.
194 return from(this.ensureUserManagerInitialized())
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
195 .pipe(
~~~~~~~~~~~~
196 mergeMap(() => this.userManager.getUser()),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
197 map(u => u && u.profile));
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #1 and #2 resulted in minor change in source code |
Also note that blocker: #17277 |
I have been waiting for a few months for a aspnetcore release with which I can create Angular 9 client apps in Visual Studio 2019. Are there any instructions to consume the template in Visual Studio 2019 and create one right away before the official release? |
So the Angular CLI comes with |
@peterblazejewicz thanks for submitting a PR for this. Unfortunately, at the time we are looking for other ways to keep the version in this template up to date, so we are closing this PR for the time being, since it might conflict with other changes. Thanks again and we're sorry for the trouble. |
@javiercn no worries, thx for the update! |
including location of the files and naming conventions
shape of types provided by 3rd party library used in templates (added
fixme note).
Addresses #14076