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

How to add link to app toolbar main-title? #513

Closed
AucT opened this issue Sep 26, 2017 · 2 comments
Closed

How to add link to app toolbar main-title? #513

AucT opened this issue Sep 26, 2017 · 2 comments

Comments

@AucT
Copy link

AucT commented Sep 26, 2017

I'm learning polymer, and when I add link to

<app-header fixed effects="waterfall" slot="header">
        <app-toolbar>
          <div spacer main-title><a href="/">Title</a></div>
          <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
        </app-toolbar>
      </app-header>
<app-header fixed effects="waterfall" slot="header">
        <app-toolbar>
          <a href="/"><div spacer main-title>Title</a>
          <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
        </app-toolbar>
      </app-header>
<app-header fixed effects="waterfall" slot="header">
        <app-toolbar>
          <a href="/" spacer main-title>Title</a>
          <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
        </app-toolbar>
      </app-header>

As you see I tried 3 different ways, but the link doesn't work. How to solve this problem?

@keanulee
Copy link
Contributor

The <a> link needs to be outside of main-title completely, since main-title cannot be clicked (https://github.com/PolymerElements/app-layout/blob/master/app-toolbar/app-toolbar.html#L87). One possible way would be:

      <app-header fixed effects="waterfall" slot="header">
        <app-toolbar>
          <div spacer></div>
          <a href="/">Title</a>
          <div main-title></div>
          <paper-icon-button icon="menu" drawer-toggle></paper-icon-button>
        </app-toolbar>
      </app-header>

@AucT
Copy link
Author

AucT commented Sep 28, 2017

@keanulee thanks for info.

@AucT AucT closed this as completed Sep 28, 2017
@AucT AucT reopened this Sep 28, 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