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

Bug: Component Inheritance is not getting inferred #219

Closed
amcdnl opened this issue Jan 23, 2017 · 1 comment
Closed

Bug: Component Inheritance is not getting inferred #219

amcdnl opened this issue Jan 23, 2017 · 1 comment

Comments

@amcdnl
Copy link

amcdnl commented Jan 23, 2017

If I have a component that inherits from another component and the template of the inherited component accesses variables from the base component, those variables are not being inferred on the inherited component.

Error:

WARNING in ./src/components/dialog/alert/alert.component.ts
[15, 23]: The property "title" that you're trying to access does not exist in the class declaration.

Example:

In base class, I define title...

@Component({
  selector: 'my-dialog',
  template: `
    <div>{{title}}</div>
  `
})
export class DialogComponent {
  @Input() title: string;
}

then inherited class template, I use title...

@Component({
  selector: 'my-dialog',
  template: `
    <div>{{title}}</div>
  `
})
export class AlertDialog extends DialogComponent  { }
@mgechev
Copy link
Owner

mgechev commented Jan 23, 2017

Hey, this is a known issue #191. I will work on it soon, I hope. In the mean time, if anyone finds some spare time a PR will be appreciated.

@mgechev mgechev closed this as completed Jan 23, 2017
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

2 participants