--- layout: default nav: attributes > ic-prepend-from ---
ic-prepend-from - The Prepend From AttributeThe 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.
Note that with these attributes, you will often want to take advantage of the ic-last-refresh parameter
that Intercooler includes in its requests. See Requests & Responses for more information.
The value of the attribute should be a valid relative path (e.g. ic-prepend-from="/foo/bar").
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.
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>