AnsweredAssumed Answered

Getting started using Visual Studio - require is undefined

Question asked by Noodles484 on Jul 17, 2015
Latest reply on Jul 21, 2015 by Noodles484

Hi,  

     I'm transitioning from the silverlight api to the the javascript api.  (Reluctantly, because I really enjoy programming in C and using MVVM and XAML, way less developer plug-ins needed and easier to debug, but I digress.)  I grabbed a simple sample javascript api html file from esri's site and when I open it in chrome, it works no problem.  Then I tried to make this in Visual Studio 2013 (which is what I want to use as my IDE).

 

I first added in the plug-ins listed on the esri site and created a new project with the template javascript-->Store Apps-->Windows Apps-->Blank App.  I copied the html over to the default.html, but when I ran it (F5), it says "JavaScript runtime error: 'require' is undefined".  I looked around the forums but the only solution listed (changing the source in the script tag from .../3.14 to .../3.14/init.js) did not work.  Since I know the html works in a browser, how do I get Visual Studio to work with this api?  And what template should I use for a proper website, there aren't many listed for javascript?

Thanks

Outcomes