Commit 90efb47f authored by Alexandre's avatar Alexandre

update: README.md

parent fc802a2e
......@@ -21,19 +21,19 @@ More details on each component in the following section.
## Components documentation
### sib-router  &  sib-route
**`<sib-router>` accepts the following attributes:**
`<sib-router>` accepts the following attributes:
- **default-route**: The `name` attribute of the default `<sib-route>` displayed.
- **route-prefix**: If you app is not run from the root of your domain name, for instance `www.your-domain.com/some-uri`, you should set `route-prefix` to "some-uri".
- **use-hash**: If you can't rewrite the URLs on your server, you might want to set this attribute to `true` to use `location.hash` instead of `location.pathname` as URLs.
**`<sib-route>` accepts the following attributes:**
`<sib-route>` accepts the following attributes:
- **id-prefix**: TO BE WRITTEN
- **active**: This attribute is present on route being displayed by `<sib-router>`. It is automatically added/removed by `<sib-router>` and should not be tinkered manually.
**Example :**
Example :
```html
<sib-router
default-route="list"
......@@ -48,15 +48,28 @@ More details on each component in the following section.
```
### sib-link
**`<sib-link>` accepts the following attributes:**
`<sib-link>` accepts the following attributes:
- **next**: The `name` attribute of the `<sib-route>` you want to access.
**Example :**
Example :
```html
<sib-link next="profile">See profile</sib-link>
```
### bind-resources attribute
To associate the currently displayed resource to a component, add the `bind-resources` attribute to it.
It will set its `data-src' attribute to the currently displayed resource's URL.
Example:
```html
<sib-conversation bind-resources></sib-conversation>
```
will result in :
```html
<sib-conversation data-src="https://your-domain/your-group-uri/3" bind-resources></sib-conversation>
```
## Events
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment