Skip to content

Instantly share code, notes, and snippets.

@tomgreever
Forked from justinbmeyer/gist:5068315
Last active December 14, 2015 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomgreever/5068608 to your computer and use it in GitHub Desktop.
Save tomgreever/5068608 to your computer and use it in GitHub Desktop.
<article class="content docs">
<section class='title'>
<div class='pullright'>
<ul class='tags'><li>function</li><li>static</li></ul>
<ul class='links'>
<li><a>source</a></li>
<li><a>download</a></li>
<li><a>tests</a></li>
</ul>
</div>
<h1>can.Control</h1>
<span class='module'>can/control.js</span>
<span class='inherits'>inherits: <a>can.Construct</a></span>
</section>
<section class='description'>
<p>Helps create organized, memory-leak free, rapidly performing, stateful controls. Use it to create UI controls like tabs, grids, and context menus, and organize them into higher-order business rules with can.route. It can serve as both a traditional view and a traditional controller.</p>
<ul class='contents'>
<li><a>new can.Control()</a></li>
<li><a>new can.Control(monkey)</a></li>
</ul>
</section>
<section class='signature'>
<h2>new can.Control(element, options) -> Object <span>since 1.0.2</span></h2>
<p>Constructor functions made with can.Construct are used to create objects with shared properties. It’s used by both can.Control and can.Model.</p>
<h3>Parameters</h3>
<ol class='parameters box-params'>
<li class='parameter'>
<h4>element <code>{string}</code></h4>
<p> the element for the control to be </p>
<ul class='options'>
<li class='option'>
<h5>monkey <code class='type'>{String | Object }</code></h5>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
</li>
</ul>
</li>
</ol>
<h3>Returns</h3>
<div class='returns box-params'>
<h4><code>{object}</code></h4>
<p> the observable or the attribute property</p>
</div>
</section>
<section class='comment'>
<h2>Creating a control</h2>
<p>Blah Blah</p>
</section>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment