http://jsbin.com/mefonoqanu/1/edit?html,output
This JSBin doesn't render its contents。它不显示:
<paper-toolbar>
文字(即"Header"
)或<div>
元素(即"Content goes here..."
)。我做错了什么?请提供一个有效的JSBin示例。
注意: Per this link,<paper-header-panel>
要求主持人拥有height
。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Polymer Bin</title>
<base href="http://element-party.xyz/">
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="all-elements.html">
</head>
<body class="fullbleed layout vertical">
<x-element></x-element>
<dom-module id="x-element">
<template>
<style>
</style>
<paper-header-panel class="flex">
<paper-toolbar>Header</paper-toolbar>
<div>Content goes here...</div>
</paper-header-panel>
</template>
<script>
(function(){
Polymer({
is: 'x-element'
});
})();
</script>
</dom-module>
</body>
</html>
答案 0 :(得分:1)
http://jsbin.com/kabede/5/edit?html,output
变化:
<span class="title">
使标题可见答案 1 :(得分:0)
#app/controllers/projects_controller.rb
class ProjectsController < ApplicationController
def index
@users = Project.all_users
end
end
#app/models/project.rb
class Project < ActiveRecord::Base
scope :all_users, -> { joins(:users) } #-> this needs to be tested
end
#app/views/projects/index.haml
- @users.each do |user|
= user.name
答案 2 :(得分:0)
Here is the minimum markup necessary to answer the question:
http://jsbin.com/jocinasovo/edit?html,output
:host
height
而不是width
bower_components
(per this link)切换到rawgit
CDN .flex
<paper-header-panel>
课程
醇>
注意: Per this link,<paper-header-panel>
要求主持人拥有height
。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Polymer Bin</title>
<base href="http://element-party.xyz/">
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="all-elements.html">
</head>
<body class="fullbleed layout vertical">
<x-element></x-element>
<dom-module id="x-element">
<template>
<style>
:host {
height: 100%
}
</style>
<paper-header-panel>
<paper-toolbar><span>Header</span></paper-toolbar>
<div>Content goes here...</div>
</paper-header-panel>
</template>
<script>
(function(){
Polymer({
is: 'x-element'
});
})();
</script>
</dom-module>
</body>
</html>