Polymer/old-docs-site

Small error in Polymer.htmlLiteral example

Open

#2,467 建立於 2018年2月6日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)HTML (2,482 fork)batch import
good first issue

倉庫指標

Star
 (1,013 star)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I'm found some error and misspelling for example in Polymer.htmlLiteral section.

static get template() {
  return Polymer.html`
    <style>
      :host { display: block; }
      ${styleTemplate}
    </style>
    <div class="shadowed">${staticValue}</div>
    ${super.template}
  `;
}
static get styleTemplate() { return Polymer.htmlLiteral`.shadowed { background: gray; }`; }

${styleTemplate} should set the scope to ${this.styleTemplate} and gray should correct to grey

Found error in this (Polymer.htmlLiteral example): https://www.polymer-project.org/2.0/docs/api/

Ref: https://www.polymer-project.org/2.0/docs/devguide/dom-template#inherited-templates

貢獻者指南