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

Member access error in templates for extended classes #413

Closed
sefo opened this issue Sep 14, 2017 · 4 comments
Closed

Member access error in templates for extended classes #413

sefo opened this issue Sep 14, 2017 · 4 comments

Comments

@sefo
Copy link

sefo commented Sep 14, 2017

Bug report

  • TSLint version: 5.7.0
  • Codelizer version: 3.2.0
  • TypeScript version: 2.5.2
  • Running TSLint via: VSCode

TypeScript code being linted

export class MenuNavLargeComponent extends MenuNavComponent {
  constructor() {
    super();
  }
}
export abstract class MenuNavComponent {
  menu: string[];
}
<div *ngFor="let m of menu"></div>

Actual behavior

Error: The property "menu" that you're trying to access does not exist in the class declaration.

Expected behavior

No error.

In the template if I replace menu by this['menu'] the error goes away but it doesn't seem like a clean solution.

@wKoza
Copy link
Collaborator

wKoza commented Sep 14, 2017

duplicate #191

@wKoza wKoza closed this as completed Sep 14, 2017
@StefH
Copy link

StefH commented Sep 14, 2017

Now both issues are closed? Please re-open one !

@CSchulz
Copy link

CSchulz commented Sep 14, 2017

This won't be fixed #191 (comment)

You can use the AoT build of Angular.

@wKoza
Copy link
Collaborator

wKoza commented Sep 14, 2017

@StefH , 'no-access-missing-member` is are out of date since the Language service Angular make this job. You can remove this rule now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants