简体   繁体   中英

Polymer property not in element

My Code:

<custom-x xy-user='online'></custom-x>

Element:

...
<div class='{{xyUser}}'></div>
...

Polymer({
    is: 'custom-x',

    properites: {
        xyUser: String
    }
});

But if i run the code and inspect it, the only thing i see is:

<div class='style-scope custom-x'></div>

I want to see the online as class. How is this possible...


Thanks in advance ;)

Use like this:

<div class$='{{xyUser}}'></div>

the $= is for data binding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM