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

Re : best way to implement common Model.List

$
0
0
thecountofzero is right, the best way (without seeing your app) is to create the list outside of the two Controls and pass it in as an option.

The other options you suggested are all very bad things to do:

- Global variables suck, never use them
- I hope you don't mean what I think you mean...Don't do it
- Having another Control doesn't solve anything. You would have to put that control on the global namespace (See #1) or pass that Control into the other two Controls, which is exactly what count said, except you are unnecessarily creating a Control


Viewing all articles
Browse latest Browse all 3491

Trending Articles