title: Ionic & Visual Studio/Cordova - Ionic not working
body: <p>I am just getting started developing an app with Ionic in the new Visual Studio Apache Cordova Tools.</p>
  
  <p>I have created a home page using one of the Ionic tutorials (almost copy and paste) and tested it in the Ripple Emulator as well as on a real device, both run with the same result.<br>
  They both run fine as apps but Ionic fails to render anything.</p>
  
  <p>In Visual Studio I get the following JavaScript error: </p>
  
  <blockquote>
    <p>"Uncaught TypeError: Cannot set property 'content' of undefined"</p>
    
    <p>File: ionic.js, Line 3898, Column: 23</p>
  </blockquote>
  
  <p>This is where the ionic.js file tries to set the property of <code>viewportTag.content</code> but the <code>viewport</code> variable is undefined.</p>
  
  <pre><code>function viewportTagUpdate() {
     var key, props = [];
     for (key in viewportProperties) {
       if (viewportProperties[key]) {
         props.push(key + (viewportProperties[key] == '_' ? '' : '=' + viewportProperties[key]));
       }
     }
  
     viewportTag.content = props.join(', ');
  }
  </code></pre>
  
  <p>The <code>viewportTag.content = props.join(', ');</code> is where the error is.</p>
  
  <p>This is my HTML: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html ng-app&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8" /&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /&gt;
  
      &lt;title&gt;Test Tabs App&lt;/title&gt;
  
      &lt;link href="/Content/ionic.css" rel="stylesheet" /&gt;
      &lt;link href="/css/index.css" rel="stylesheet" /&gt;
  
      &lt;script src="/cordova.js"&gt;&lt;/script&gt;
      &lt;script src="/scripts/platformOverrides.js"&gt;&lt;/script&gt;
      &lt;script src="/scripts/viewScripts/Home.js"&gt;&lt;/script&gt;
      &lt;script src="/scripts/packages/ionic/ionic.bundle.js"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
      &lt;ion-tabs&gt;
          &lt;ion-tab class="tabs-positive" title="Home"&gt;
              &lt;ion-content&gt;
                  &lt;p&gt;Home Tab&lt;/p&gt;
              &lt;/ion-content&gt;
          &lt;/ion-tab&gt;
          &lt;ion-tab title="About"&gt;
              &lt;ion-content&gt;
                  &lt;p&gt;About Tab&lt;/p&gt;
              &lt;/ion-content&gt;
          &lt;/ion-tab&gt;
      &lt;/ion-tabs&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Has anyone ran into this problem with Ionic before and knows how to solve it?</p>
  
  <p>-Kyle</p>