Click here to Skip to main content
14,732,999 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working on MVC Areas where I am bundling all coffeescripts as different viewmodels and rendering them in my layout page and specific pages that require corresponding coffee scripts. There are two errors which I couldn't figure out the solution.

1) {"The controller for path '/bundles/underscore' was not found or does not implement IController."} Underscore is a js file. I have done few things to make it work, like not specifying version of bundletransformer in project file etc. But none of them really worked.

2) Javascript runtime error: XXXXViewModel is undefined. This ViewModel is a coffeescript. I have tried many solutions but nothing worked.

If I move the controller which is specific to area and which corresponds to the above mentioned viewmodel, outside the area to default area, everything works fine. I can see the viewmodel populates on my page. But if I have my controller in area, the view which renders this viewmodel is not being generated on the webpage. For a note, I have few more coffeescripts as viewmodels and I think, none of them are working if I use areas. I don't know if I am missing a link like configuration settings etc, which connects areas and viewmodels.

I hope someone can help me solving this issue. Thanks in advance.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900