[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/httpsa/guide/feature/version-1.0/basic/interpolation.md [Back]  [Original]

# {#interpolation} Regular - [](#text) - - [](#attr) - DOM - [](#prop) - - [Fragment](#fragment) - `{Expression}``{}` ____ > [](../reference/expression.md#case) ## {#text} - : `
{username}
` Regular textNode, `textContent` ____ __Example__ ```js const app = new Regular({ template: "
{username}
", data: {username: 'leeluolee'} }); app.$inject('#app'); ``` `
leeluolee
` >textContent ## {#attr} : `
haha
` Regular ____ ____ 1. `{}`, Regular `'.modal-{klass} z-{state}'` `'.modal-' + klass + 'z-' + state` 2. , Regular , , (`class`, `style``title`) 3. , Regular [](./directive.html) 4. DOM API __Example__ ```javascript ``` 1. `r-model`: [](./directive.html#r-model) 2. `style`: , `"left: " + value + "px"` 3. `class`: 4. `type`: {%raw%} __FAQ__ - Regularclass - [r-style](directive.md#r-style)`r-style={'left': '10px'}` `'left': '10px'``{{'left': '10px'}}` {%endraw%} ## {#prop} - : `` ( `blog.title` )( `title`) ____ [setable](../reference/expression.md#setable)( `title={blog.title + ':' + blog.subTitle}`), ____ [](./component#prop) ### Fragment {#fragment} Regular ```html ``` [ - ](../advanced/composite.md#fragment)
Web Proxy Viewer  |  New URL  |  Original Page