-
Notifications
You must be signed in to change notification settings - Fork 12k
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
The property "async" that you're trying to access does not exist in the class declaration. #6554
Comments
I had trouble reproducing it with as simple ng new, but on my project it is doing it. I'm going to make an example that reproduces the problem very soon then :) |
Ok, I finally managed to reproduce it, simply apply the following patch to a project created with diff --git a/src/app/app.component.html b/src/app/app.component.html
index d0322ef..dd2aeed 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -7,5 +7,5 @@
</div>
<h2>Here are some links to help you start: </h2>
-<ul>
+<ul *ngIf="(test$ | async).v">
<li>
<h2><a target="_blank" href="https://angular.io/docs/ts/latest/tutorial/">Tour of Heroes</a></h2>
diff --git a/src/app/app.component.ts b/src/app/app.component.ts
index 7b0f672..bd90299 100644
--- a/src/app/app.component.ts
+++ b/src/app/app.component.ts
@@ -1,3 +1,4 @@
import { Component } from '@angular/core';
+import { Observable } from 'rxjs/Observable';
@Component({
@@ -8,3 +9,5 @@ import { Component } from '@angular/core';
export class AppComponent {
title = 'app';
+
+ test$ = Observable.of({ v: true });
}
diff --git a/src/main.ts b/src/main.ts
index a9ca1ca..027824e 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -5,4 +5,6 @@ import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
+import 'rxjs/add/observable/of';
+
if (environment.production) {
enableProdMode(); |
If I'm reading the Codelyzer thread right, there's isn't a fix available at the moment. Seems like the best we can do is to wait until it's fixed there and update the default version of new projects. |
@filipesilva ok, cool. |
Thanks for reporting this issue. This issue is now obsolete due to changes in the recent releases. Please update to the most recent Angular CLI version. If the problem persists after upgrading, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
Repro steps.
Use the
async
pipe in templates and runng lint
.The log given by the failure.
I get this error on html file using the
async
pipe:Desired functionality.
I should not get this error.
Mention any other details that might be useful.
This was a problem for some time in the past, then it disappeared, and came back again with latest codelizer in angular-cli 1.1.0.
See mgechev/codelyzer#190 for a discussion on the matter, but it's not clear what is the solution and now that codelizer 3.0.1 is used by default, it is now a problem for all users of angular-cli!
The text was updated successfully, but these errors were encountered: