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

docs(typescript): add examples of TypeScript location and lifecycle interfaces #432

Merged
merged 1 commit into from
Feb 6, 2020

Conversation

platosha
Copy link
Contributor

@platosha platosha commented Feb 5, 2020

Fixes #423


This change is Reviewable

@platosha platosha added the hilla label Feb 5, 2020
Copy link
Contributor

@haijian-vaadin haijian-vaadin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

Copy link
Member

@manolo manolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@manolo manolo merged commit 4c13710 into master Feb 6, 2020
@manolo manolo deleted the docs/typescript-interface branch February 6, 2020 16:54

@customElement('my-view')
class MyViewElement extends LitElement {
@property({type: Object}) location = router.location;
Copy link
Contributor

@abdonrd abdonrd Feb 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not something like:

import { RouterLocation } from '@vaadin/router';

...

  @property({ type: Object })
  private location!: RouterLocation;

Copy link
Contributor

@abdonrd abdonrd Feb 20, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because, right now, I have no access to the router.

I'm using a init function like:
https://github.com/Polymer/pwa-starter-kit/compare/master...abdonrd:vaadin-router?expand=1#diff-15ee858ae5d5aa9b3e2846cfd1c4c466R3
(but in a TypeScript project)

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

Successfully merging this pull request may close these issues.

Document VaadinRouterView
4 participants