Hello,
I am using JavascriptMVC 3.3 with packages features to load features only when needed.
So I have a control defined in cookbook/recipe/create and I use it as a package in another control:
- steal.packages(..., 'cookbook/recipe/create', ...)
- .then('can','./init.ejs',
- 'cookbook/models/recipe/recipe.js',
- function(can, initView,
- Recipe){
- return can.Control(
- /** @Static */
- {
- defaults : {
- Recipe: Recipe
- }
- },
- /** @Prototype */
- {
- init : function(){
- this.element.html(initView({}));
- },
- ...
- "{Recipe} create": function(){
- steal('cookbook/recipe/create', function(RecipeCreate){
- new RecipeCreate('#recipeForm');
- });
- },
- ...
- });
- });
If I run that in dev mode, it work fine, but if i run in production mode, RecipeCreate, at line 21 is undefined, thus the control create cannot be built at line 22.
Anyone has an idea how I could build the create control?
Sandrine.