Skip to content

Commit b2a567f

Browse files
committed
update readme
1 parent 57c2328 commit b2a567f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gia",
3-
"version": "0.0.4",
3+
"version": "0.0.5",
44
"description": "Minimalistic JS framework for server rendered websites.",
55
"main": "dist/gia.js",
66
"private": false,

readme.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ this.element; // DOM element
112112
#### ref
113113
Variable holding object with all the elements marked with `g-ref` attribute within the root element, where the contents of the attribute is used as *ref* name. By setting the `ref` variable, component gets a signal to look for the elements available within the root element of component. So this..
114114
```html
115-
<div g:component="SampleComponent">
115+
<div g-component="SampleComponent">
116116
<div g-ref="singleRef">
117117
<div g-ref="multipleRefs">
118118
<div g-ref="multipleRefs">
@@ -143,8 +143,8 @@ constructor(element) {
143143
```
144144
In case some components are overlapping, but you would still like to use a same names for the ref elements, it is also possible to define the component for which the element is intended for inside of `g-ref` attribute.
145145
```html
146-
<div g:component="SampleComponent">
147-
<div g:component="AnotherComponent">
146+
<div g-component="SampleComponent">
147+
<div g-component="AnotherComponent">
148148
<div g-ref="SampleComponent:refElement">
149149
</div>
150150
</div>
@@ -155,7 +155,7 @@ The `refElement` will only be selected and stored by `SampleComponent`, and no o
155155
Variable holding options of the component. Default options can be set in constructor of the component. Options get automatically rewritten from the `g-options` attribute.
156156

157157
```html
158-
<div g:component="SampleComponent" g:options='{"someOption": "customValue"}'>
158+
<div g-component="SampleComponent" g-options='{"someOption": "customValue"}'>
159159
```
160160
```javascript
161161
constructor(element) {

0 commit comments

Comments
 (0)