
- add ng2_switch benchmark to track `ngFor` over `ngSwitch` - measure create only, createDestroy and update - simplify the created dom - always add a style binding
23 lines
599 B
HTML
23 lines
599 B
HTML
<link rel="import" href="/all/benchmarks/vendor/polymer/polymer.html">
|
|
<dom-module id="binary-tree">
|
|
<template>
|
|
<span style="[[data.style]]"> {{data.value}} </span>
|
|
<template is="dom-if" if="[[data.left]]">
|
|
<binary-tree data="[[data.left]]"></binary-tree>
|
|
</template>
|
|
<template is="dom-if" if="[[data.right]]">
|
|
<binary-tree data="[[data.right]]"></binary-tree>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
Polymer({
|
|
is: 'binary-tree',
|
|
properties: {
|
|
data: Object
|
|
},
|
|
leftTree: null,
|
|
rightTree: null
|
|
});
|
|
</script>
|
|
</dom-module>
|