javascript - Layout Attribute not working -
i'm doing stupidly wrong. i'm using polymer 1.0
, trying make basic module. when specify layout attributes
won't work. however, if type class="layout flex [etc..]"
, on, work. see below:
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script> <script src="bower_components/time-elements/time-elements.js"></script> <link rel="import" href="/bower_components/polymer/polymer.html"> <dom-module id="x-chat-list"> <template> <section class="user-list" layout horizontal> <div class="avatar {{color}}" style="background-image: url({{avatar}})"> <div class="status {{status}}"></div> </div> <div flex> <div class="username">{{username}}</div> <div class="text">{{text}}</div> </div> <time class="timestamp" is="relative-time" datetime="{{timestamp}}"></time> </section> </template> <script> polymer({ is: 'x-chat-list', properties: { avatar: '', color: '', username: '', text: '', status: '', timestamp: new date().toisostring() } }); </script> </dom-module>
it's if doesn't recognize polymer or something.
thank you!
layout attributes have been removed in 1.0 , replaced layout classes (migration guide). when using classes, doing right thing.
Comments
Post a Comment