Polymer/old-docs-site

Properties outside the properties object

Open

#2,463 创建于 2018年2月6日

在 GitHub 查看
 (3 评论) (0 反应) (0 负责人)HTML (1,013 star) (2,482 fork)batch import
P3docsgood first issuequestion

描述

From @hadriann on February 5, 2018 17:31

Description

The usage of properties outside of the properties object is not documented. From the docs:

In most cases, a property that's part of your element's public API should be declared in the properties object.

It is implied that there are use cases when you need not declare a property in the properties object.

One such use case might be a component's private property (like a config), that is set by the component itself (not received via attributes), and passed down to one of its children.

There are a few questions regarding this:

  1. Is the above scenario (or any scenario) a valid use case for outside-the-properties properties?
  2. Will basic data binding work for such properties?
  3. Will computed data binding work?
  4. Will such a property be bound at the first render (ready) of the markup?
  5. What is the best practice (Polymer-way) to declare or use such private properties?

Copied from original issue: Polymer/polymer#5093

贡献者指南