ic-append-from - The Append From Attribute

Summary

The ic-append-from attribute binds a given HTML element's children to a URL. It does not cause any requests to happen by itself, but it can respond to events caused by other attributes.

When Intercooler issues a request for an element with an ic-append-from, it will issue a GET and will append the resulting HTML fragment as children of the current element. If you wish to limit the total number of children on of an element, you can use the ic-limit-children attribute.

Syntax

The value of the attribute should be a valid relative path (e.g. ic-append-from="/foo/bar").

Dependencies

ic-append-from implies a dependency on its path, and Intercooler will issue requests for elements whenever it detects an action that the path depends on. See Dependencies for more information.

Example

Here is a simple example, using a poll interval to update:

  <ul ic-append-from="/list_src" ic-poll="2s" ic-limit-children="5"></ul>