js-doc-parse icon indicating copy to clipboard operation
js-doc-parse copied to clipboard

dynamic AMD require

Open arodbar opened this issue 11 years ago • 0 comments

I have a problem when I use a dynamic "require" into function. For example:

function( key){
    if (!result.service) {
        require(["app/models/" + key], function(StaticDataModel) {
            ...
       }
    }
}

where "key" it is a String argument of my function.

The error that is displayed on screen is:

"Error: ENOENT, no such file or directory 'path\app\models\undefined.js'"

I tried to put this file into the exclude files list but it is important that this file is into the documentation. I also tried to put the 'undefined.js' into that list but without any result.

I would like if you could guide me to how resolve this problem.

arodbar avatar Jan 21 '14 12:01 arodbar