I'm trying to use steal with CanJS, but I'm having some problems with the views, most probably because I'm using a directory structure similar to JMVC while CanJS is looking for the views in the root directory. My code looks as follows:
app file:
- steal('can/control', 'can/view/ejs').then('widgets/somewidget').then(function() {
- // app code
- });
widgets/somewidget/somewidget.js:
- steal('./views/init.ejs').then(function() {
- init: {...}
- )
Folder structure as follows:
|--- widgets
|--- --- somewidget
|--- --- --- somewidget.js
|--- --- --- views
|--- --- --- --- init.ejs
So if I used can.view('init.ejs', data); it won't work because it's trying to load init.ejs from the root folder. Am I doing anything wrong or is this a bug?
Thanks.