ic-prepend-from - The Prepend From Attribute

Summary

The ic-prepend-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-prepend-from, it will issue a GET and will prepend 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-prepend-from="/foo/bar").

Dependencies

ic-prepend-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-prepend-from="/list_src" ic-poll="2s" ic-limit-children="5"></ul>