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

Re : How to check if a controller is initialized ?

$
0
0
There are two ways to do this:
  1. Keep track of whether the controller has been instantiated using a property on your "application" controller... not really the best b/c now your controller logic depends on your application.
  2. Keep track of the number of controller instances on the controller constructor: http://jsfiddle.net/ryanwheale/2MzE4/

Viewing all articles
Browse latest Browse all 3491

Trending Articles