can-attribute-observable
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -47,7 +47,6 @@ @module {Function} can-attribute-observable | ||
<script type="module"> | ||
import {Component} from "can"; | ||
import { StacheElement } from "can"; | ||
Component.extend({ | ||
tag: "my-demo", | ||
view: ` | ||
class MyDemo extends StacheElement { | ||
static view = ` | ||
<input | ||
@@ -64,5 +63,6 @@ on:input:value:bind="this.cardNumber" | ||
on:blur="this.dispatch('payBlur')">Pay</button> | ||
`, | ||
ViewModel: { | ||
cardNumber: "string", | ||
`; | ||
static props = { | ||
cardNumber: String, | ||
cvcNumber: String, | ||
cvcFocus: { | ||
@@ -82,3 +82,2 @@ value({listenTo, resolve}) { | ||
}, | ||
cvcNumber: "string", | ||
payFocus: { | ||
@@ -97,5 +96,6 @@ value({listenTo, resolve}) { | ||
} | ||
} | ||
} | ||
}); | ||
} | ||
}; | ||
} | ||
customElements.define('my-demo', MyDemo); | ||
</script> | ||
@@ -115,8 +115,6 @@ ``` | ||
<script type="module"> | ||
import {Component} from "can"; | ||
import { StacheElement } from "can"; | ||
Component.extend({ | ||
tag: "pizza-toppings-picker", | ||
view: ` | ||
class PizzaToppingsPicker extends StacheElement { | ||
static view = ` | ||
<label> | ||
@@ -143,11 +141,15 @@ What pizza toppings do you like? | ||
{{/ for }} | ||
</p> | ||
`, | ||
ViewModel: { | ||
toppings: {default: () => []} | ||
} | ||
}); | ||
</p> | ||
`; | ||
static props = { | ||
toppings: { | ||
get default() { | ||
return []; | ||
} | ||
} | ||
}; | ||
} | ||
customElements.define('pizza-toppings-picker', PizzaToppingsPicker); | ||
</script> | ||
``` | ||
@codepen |
{ | ||
"name": "can-attribute-observable", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Create observables from HTML attributes.", | ||
@@ -5,0 +5,0 @@ "main": "can-attribute-observable", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53108
24