Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : can.js EJS and helpers

$
0
0
The only change in CanJS is that instead of doing this:
  1. <p <%= plugin('controlA', {...}) %>></p>
You do this:
  1. <p <%= (el) -> new controlA(el, {...}) %>></p>
What happens under the hood is exactly the same. CanJS Controls aren't plugins by default like they were in JMVC. You use new to create an instance of a Control. You can use the can.Control.plugin plugin to enable this sort of functionality again.

Viewing all articles
Browse latest Browse all 3491

Trending Articles