"'WinJS' is not defined." and "Windows' is not defined." -


sorry english. started learning develope windows store app. , found tutorial here. follow it, create new javascript windows store app. when build app, no code added, jshint show error that:

'winjs' not defined. 'windows' not defined 

there default.html

<!doctype html> <html> <head>     <meta charset="utf-8" />     <title>simplechanel9reader</title>      <!-- winjs references -->     <link href="//microsoft.winjs.1.0/css/ui-dark.css" rel="stylesheet" />     <script src="//microsoft.winjs.1.0/js/base.js"></script>     <script src="//microsoft.winjs.1.0/js/ui.js"></script>      <!-- simplechanel9reader references -->     <link href="/css/default.css" rel="stylesheet" />     <script src="/js/default.js"></script> </head> <body>     <div id="main">         <header id="banner">             <button id="backbutton" class="win-backbutton"></button>             <h1 id="maintitle" class="win-title">welcome chanel9</h1>         </header>         <section id="content"></section>     </div> </body> </html> 

and default.js

// introduction blank template, see following documentation: // http://go.microsoft.com/fwlink/?linkid=232509 (function () {     "use strict";     winjs.binding.optimizebindingreferences = true;      var app = winjs.application;     var activation = windows.applicationmodel.activation;      app.onactivated = function (args) {         if (args.detail.kind === activation.activationkind.launch) {             if (args.detail.previousexecutionstate !== activation.applicationexecutionstate.terminated) {                 // todo: application has been newly launched. initialize                 // application here.             } else {                 // todo: application has been reactivated suspension.                 // restore application state here.             }             args.setpromise(winjs.ui.processall());         }     };      app.oncheckpoint = function (args) {         // todo: application suspended. save state         // needs persist across suspensions here. might use         // winjs.application.sessionstate object, automatically         // saved , restored across suspension. if need complete         // asynchronous operation before application suspended, call         // args.setpromise().     };      app.start(); })(); 

there infomation visual studio

microsoft visual studio ultimate 2012 version 11.0.50727.1 rtmrel microsoft .net framework version 4.5.50709  installed version: ultimate  architecture , modeling tools   04940-004-0039002-02068 microsoft architecture , modeling tools  uml® , unified modeling language™ trademarks or registered trademarks of object management group, inc. in united states , other countries.  lightswitch visual studio 2012   04940-004-0039002-02068 microsoft lightswitch visual studio 2012  office developer tools   04940-004-0039002-02068 microsoft office developer tools  team explorer visual studio 2012   04940-004-0039002-02068 microsoft team explorer visual studio 2012  visual basic 2012   04940-004-0039002-02068 microsoft visual basic 2012  visual c# 2012   04940-004-0039002-02068 microsoft visual c# 2012  visual c++ 2012   04940-004-0039002-02068 microsoft visual c++ 2012  visual f# 2012   04940-004-0039002-02068 microsoft visual f# 2012  visual studio 2012 code analysis spell checker   04940-004-0039002-02068 microsoft® visual studio® 2012 code analysis spell checker  portions of international correctspell™ spelling correction system © 1993 lernout & hauspie speech products n.v. rights reserved.  american heritage® dictionary of english language, third edition copyright © 1992 houghton mifflin company. electronic version licensed lernout & hauspie speech products n.v. rights reserved.  visual studio 2012 sharepoint developer tools   04940-004-0039002-02068 microsoft visual studio 2012 sharepoint developer tools  bracecompleter   1.0 automatically inserts closing braces after typing open brace , pressing enter.  codemaid   #114 codemaid open source visual studio extension cleanup, dig through , simplify our c#, c++, f#, vb, xaml, xml, asp, html, css , javascript coding.  written steve cadwallader, more information visit http://www.codemaid.net/  jslint.vs2012   1.0 adds jsllint support visual studio  nuget package manager   2.0.30625.9003 nuget package manager in visual studio. more information nuget, visit http://docs.nuget.org/.  preemptive analytics visualizer   1.0 microsoft visual studio extension visualize aggregated summaries preemptive analytics product.  sql server data tools   11.1.20627.00 microsoft sql server data tools  visual studio 11 editor extension   1.0 information package  vscommands11   11.0 vscommands 11  web developer tools   1.0.30710.0 microsoft web developer tools contains following components: page inspector: tool offers efficient way decompose web applications , diagnose front-end issues. web publishing: extensions required web publishing both hosted servers on premises. web form templates: includes default templates web form applications. editor extensions: includes html, css, , js editor extensions enhance development experience.  zencoding   0.7 danny zen coding visual studio plugin high-speed html, xml, xsl (or other structured code format) coding , editing. 

please me, error come when build every javascript windows store app.

try adding via nuget: "install-package winjs"

this ensure installed in solution.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -