ic-global-include - The Global Include Attribute

Summary

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

Syntax

The value of the ic-global-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 any element in the document and will be included with all intercooler requests.

Dependencies

ic-global-include has no effect on dependencies.

Example

In this example, the input specifies it should be included on all requests to the server.

  <div ic-src="/update">Please Enter A Name...</div>

  <input id="name" name="name" ic-global-include="#name"/>

  <button ic-post-to="/update">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...