new TextBinder()
Enables the use of {data} binders in text content.
- Source:
Example
```html
<html>
<body>
<h1>{title}</h1>
<p>{content}</p>
</body>
</html>
```
```javascript
var model = { title: 'Hello', content: 'World' };
var binder = new Binder(new TextBinder());
binder.bind(document.body, model);
```
Methods
(static) parse(text) → {Array}
Parses a string into text/selector pairs.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string | The text to parse |
- Source:
Returns:
An array of parsed segments: {text, selector}
- Type
- Array