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

Feature: Add ability to provide meta tags via RouteMeta #214

Closed
1 of 2 tasks
markostanimirovic opened this issue Jan 16, 2023 · 0 comments
Closed
1 of 2 tasks

Feature: Add ability to provide meta tags via RouteMeta #214

markostanimirovic opened this issue Jan 16, 2023 · 0 comments
Assignees
Labels
accepting PRs enhancement New feature or request

Comments

@markostanimirovic
Copy link
Member

markostanimirovic commented Jan 16, 2023

Which scope/s are relevant/related to the feature request?

router

Information

Add the ability to provide meta tags for a specific page via RouteMeta in the following way:

// routes/index.ts

export const routeMeta: RouteMeta = {
  title: 'Home',
  meta: [
    { name: 'description', content: 'Home Page Description' },
    { name: 'author', content: 'Marko' },
    // ...
  ],
};

@Component({ /* ... */ })
export default class HomeComponent {}

Meta tags can be also set via resolver:

export const routeMeta: RouteMeta = {
  title: 'Home',
  meta: () => inject(MetaService).getMetaTags(),
};

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No
@markostanimirovic markostanimirovic added the enhancement New feature or request label Jan 16, 2023
@markostanimirovic markostanimirovic changed the title Feature: Add ability to provide meta tags via defineRouteMeta Feature: Add ability to provide meta tags via RouteMeta Jan 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepting PRs enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants