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

Message for 'use-host-property-decorator' includes invalid link to Angular style docs #510

Closed
roddy opened this issue Feb 7, 2018 · 2 comments

Comments

@roddy
Copy link

roddy commented Feb 7, 2018

The "use-host-property-decorator", as documented here, displays the following warning message when triggered via TSLint:

Use @HostBindings and @HostListeners instead of the host property (https://angular.io/styleguide#style-06-03)

The documentation is also wrong:

Use @HostProperty decorator rather than the host property of @component and @directive metadata.

See more at https://angular.io/styleguide#style-06-03.

The URL is wrong and leads to an error/404 page. The correct URL is https://angular.io/guide/styleguide#style-06-03

Observed on:

  • Angular 5.2.2
  • Codelyzer 4.1.0
  • TSLint 5.9.1

Code to reproduce / trigger this warning:

@Component({
  selector: 'app-test',
  template: `<p>Hello!</p>`,
  styles: [`p{display:block;}`],
  host: {
    "class": "example",
  }
})
export class TestComponent {
  constructor() {}
}
@mgechev
Copy link
Owner

mgechev commented Feb 7, 2018

Thanks for sharing this! I'll talk to the docs team.

@mgechev
Copy link
Owner

mgechev commented Feb 8, 2018

angular/angular#22078 will resolve it.

@mgechev mgechev closed this as completed Feb 8, 2018
@mgechev mgechev added this to the 4.1.1 - Anne Condon milestone Feb 11, 2018
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