ic-include - The Include Attribute


The ic-include attribute tells Intercooler to include additional parameters in a request that it makes to the server, allowing you to pass up additional UI information to the server.


The value of the ic-include attribute can either be a CSS/JQuery element selector of elements to include in the request or a JSON object of name/value pairs to include. If it is a JSON object, it must satisfy the jQuery parseJSON() requirements.

This attribute may be placed on parent elements, allowing you to specify behavior across multiple elements.


ic-include has no effect on dependencies.


In this example, the button includes the value of the input when it POSTs to the server.

  <div ic-src="/update">Please Enter A Name...</div>
  <input id="name" name="name"/>
  <button ic-post-to="/update" ic-include="#name">Upload Name</button>

Note that the response to the button click is the content to swap in for the div, not the button.

Please Enter A Name...