define
can.Map.prototype.define{Object<String,attrDefinition>}
Defines the type, initial value, get, set, remove, and serialize behavior for attributes of a can.Map.
{Object<String,attrDefinition>}
Defines the type, initial value, get, set, remove, and serialize behavior for attributes of a can.Map.
Use
The can.Map.define plugin allows you to completely control the behavior of attributes on a can.Map. To use it, you specify an define object that is a mapping of properties to attribute definitions. The following example specifies a Paginate Map:
Overview
This plugin is a replacement for the now deprecated attributes and setter plugins. It intends to provide a single place to define the behavior of all the properties of a can.Map.
Here is the cliffnotes version of this plugin. To define...
Demo
The following shows picking cars by make / model / year: