Skip to content
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

Update plugin to use Angular 6 #264

Closed
thw0rted opened this issue Jun 25, 2018 · 15 comments
Closed

Update plugin to use Angular 6 #264

thw0rted opened this issue Jun 25, 2018 · 15 comments

Comments

@thw0rted
Copy link

thw0rted commented Jun 25, 2018

Plugin is still built against Angular 5, should be updated to Angular 6. Might resolve #256 , and this comment on an Angular issue suggests that it's necessary for the new type checker to show up (?), which would make

<p *ngIf="foo">{{foo.length}}</p>

stop red-lining foo.length when strictNullChecks is turned on.

As an aside, if that comment is mistaken and that edge-case still isn't handled even when built against latest Angular, please let me know and I'll open a separate issue to make sure it gets tracked. I thought this was what #71 was talking about but it's a separate case. I'm hoping that this is an easy fix, and will also cover *ngIf="foo && (foo.length > 2)" red-lining foo.length (even though the and-operator should remove null from foo's type before evaluating).

@sebastiandg7
Copy link

Maybe duplicate of #256

@thw0rted
Copy link
Author

thw0rted commented Jun 27, 2018

I did reference that issue, but I think this should remain open as its own thing because a) it might be possible to resolve #256 without switching to Angular 6 and b) it might be possible to build against Angular 6 without actually resolving the template-scope problem I give as an example. I would like to make sure my specific problem (incorrect redlining in templates) actually gets resolved.

@aj-r
Copy link

aj-r commented Jul 6, 2018

This plugin is basically unusable for us right now since we take advantage of TS 2.7 features like strictPropertyInitialization. Because of this our HTML files are covered in errors like this:

[Angular] Identifier 'xxx' is not defined. '<anonymous>' does not contain such a member

Angular 6 has been out for 2 months now - it would be nice to see this plugin updated.

@JitinDhillon
Copy link

Is work even happening on this plugin? I see that the last commit was over 6 months ago.

@CodySchrank
Copy link

@JitinDhillon Seems like this has been abandoned. Unfortunately I don't know of any maintained forks or alternatives.

@thomas-parrish
Copy link

Real shame that this has been abandoned.

@watabtme
Copy link

watabtme commented Aug 14, 2018

@chuckjaz @DBosley is it possible to get some information regarding the Angular team's intention to keep this project alive? There are lots of glaring open issues at the moment and it seems like this project is abandoned. If you guys are no longer maintaining this, is it possible to assign someone else from the Angular team?

Edit: just noticed that @chuckjaz hasn't been active on Github for almost a year, so just to try and poke some other Angular members: @IgorMinar @vicb @petebacondarwin ?

@universonic
Copy link
Contributor

Hey guys, I have just made a PR to the master branch in order to support the latest Angular v6. (#276 ). I need someone to help me to take a look at those changes.

@Teamop
Copy link

Teamop commented Aug 30, 2018

v0.1.10 is out with angular-language-service 6.1 and TS 2.7, thanks @kyliau

@thw0rted
Copy link
Author

I still get the "does not contain such a member" error for myControl.errors?.someErrorName. Is that expected to be fixed now that it's using the newer language service / TS version?

@magnusbakken
Copy link

Likewise. I'm on version 0.1.10 now, but I still seem to be getting all the spurious errors I was getting before.

Here's a an example of a case where the language service complains about a nullable value even though I have a surrounding *ngIf="model !== null check.

model-can-not-be-null

@thw0rted
Copy link
Author

Yeah, as far as I can tell the improved scoping for ngIf that's supposed to come with the new language service, isn't working. Other kinds of narrowing don't work either. For example, I have a class with a method isFoo(x: any): x is Foo. The AOT compiler correctly recognizes this as narrowing the type of the passed variable to be Foo, but I get "does not contain such a member" errors in Code when I reference Foo members inside an *ngIf="isFoo(thing)".

@zacnomore
Copy link

This appears fixed a couple ways to sunday.
Up to 6:
f5e2317

Then 7:
2d9310d

And 8:
c2df256

@kyliau
Copy link
Contributor

kyliau commented Jun 3, 2019

Closing this, since as @zacnomore mentioned, the latest version is now using @angular/language-service version 8.
Moving forward, I'll make sure the extension is kept up-to-date with Angular release.

@kyliau kyliau closed this as completed Jun 3, 2019
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests