This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<body> | |
<todo-app></todo-app> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.20/custom-elements-es5-adapter.js" defer></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/1.0.20/webcomponents-sd-ce.js" defer></script> | |
<script src="./dist/TodoApp.js" defer></script> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone git@github.com:kyuwoo-choi/todo-web-components.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
el.innerHTML = ` | |
<div> | |
<h1>${title}</h1> | |
<body>${content}</body> | |
</div> | |
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- add dependencies --> | |
<link rel="import" href="./dependent-element.html"> | |
<!-- web component template --> | |
<template id="nameTagTemplate"> | |
<style> | |
.outer { | |
border: 2px solid brown; | |
background: red; | |
} | |
.name { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- main page --> | |
<head> | |
<link rel="import" href="bootstrap.html"> | |
</head> | |
<!-- bootstrap.html --> | |
<link rel="stylesheet" href="bootstrap.css"> | |
<link rel="stylesheet" href="fonts.css"> | |
<script src="jquery.js"></script> | |
<script src="bootstrap.js"></script> | |
<script src="bootstrap-tooltip.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="nameTag">Bob</div> | |
<template id="nameTagTemplate"> | |
<style> | |
.outer { | |
border: 2px solid brown; | |
background: red; | |
} | |
.name { | |
color: black; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template id="productrow"> | |
<tr> | |
<td class="record"></td> | |
<td></td> | |
</tr> | |
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Virtual DOM example | |
var tree = render(count); // We need an initial tree | |
var rootNode = createElement(tree); // Create an initial root DOM node ... | |
document.body.appendChild(rootNode); // ... and it should be in the document | |
setInterval(function () { | |
count++; | |
var newTree = render(count); | |
var patches = diff(tree, newTree); | |
rootNode = patch(rootNode, patches); | |
tree = newTree; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- angular: loop --> | |
<header ng-repeat-start="item in items"> | |
Header {{ item }} | |
</header> | |
<!-- handlebars: conditional --> | |
<div class="entry"> | |
{{#if author}} | |
<h1>{{firstName}} {{lastName}}</h1> | |
{{/if}} | |
</div> |