ic-deps - The Dependencies Attribute

Summary

The ic-deps attribute tells Intercooler that an element depends on a given path and should be updated if a change to that path is detected.

Syntax

The value of the ic-deps attribute is a comma-separated list of paths that the element depends on. Note that the special single character "*" indicates that an element depends on all detected changed.

To disable dependencies on an element, you can use ic-deps="ignore"

Dependencies

ic-deps adds the dependencies it specifies to the element it is on.

Example

Here is a simple element that depends on any changes:

  <button ic-post-to="/path/1">Button 1</button>
  <button ic-post-to="/path/2">Button 2</button>
  <div ic-src="/src" ic-deps="*">0 Clicks</div>
      
0 Clicks