UNPKG

@danielkalen/simplybind

Version:

Magically simple, framework-less one-way/two-way data binding for frontend/backend in ~5kb.

29 lines (27 loc) 833 B
<template> <form> <h4>Products</h4> <label> <input type="radio" name="objects-matcher" model.bind="{ id: 0, name: 'Motherboard' }" matcher.bind="productMatcher" checked.bind="selectedProduct"> Motherboard </label> <label> <input type="radio" name="objects-matcher" model.bind="{ id: 1, name: 'CPU' }" matcher.bind="productMatcher" checked.bind="selectedProduct"> Motherboard </label> <label> <input type="radio" name="objects-matcher" model.bind="{ id: 2, name: 'Memory' }" matcher.bind="productMatcher" checked.bind="selectedProduct"> Motherboard </label> Selected product: ${selectedProduct.id} - ${selectedProduct.name} </form> </template>