title: How to add a template from another file in Ionic?
body: <p>I'm writing a web app using <code>phonegap</code> and <code>Ionic</code>. I want to write each HTML page in a different file but I cannot manage to do this. In <code>Ionic</code> API they show only the following example:</p>
  
  <pre><code>&lt;script id="templates/home.html" type="text/ng-template"&gt;
    &lt;ion-view view-title="Home"&gt;
      &lt;ion-content class="padding"&gt;
        &lt;p&gt;
          &lt;a class="button icon icon-right ion-chevron-right" href="#/tab/facts"&gt;Scientific Facts&lt;/a&gt;
        &lt;/p&gt;
      &lt;/ion-content&gt;
    &lt;/ion-view&gt;
  &lt;/script&gt;
  </code></pre>
  
  <p>Which is a HTML code written inside a <code>&lt;script&gt;</code> tags, in the <code>index.html</code> page.
  I tried to create a different file with the name <code>home.html</code> for instance, and received the following error:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load file: path-to-the-file. Cross origin requests are only supported for protocol schemes: http, data, chrome-extension, https, chrome-extension-resource.</p>
  </blockquote>
  
  <p>My <code>js</code> is looks like this:</p>
  
  <pre><code>angular.module('myApp', ['ionic'])
  
  
  .config(function ($stateProvider, $urlRouterProvider) {
  // Set and define states
  $stateProvider
      .state('/', {
          url: '/',
          templateUrl: 'index.html'
      })
      .state('home', {
          url: '/home',
          templateUrl: 'templates/home.html'
      });
  
  $urlRouterProvider.otherwise("/");
  </code></pre>
  
  <p>})</p>
  
  <p>and html page:</p>
  
  <pre><code>&lt;ion-view title="home"&gt;
  &lt;ion-content&gt;
     The content of the page 
    &lt;a href="#/home"&gt;Register&lt;/a&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p></p>
  
  <p>I see the <code>index.html</code> page with the register link, but clicking it doesn't execute anything.
  It seems like only when it is wrapped in a <code>&lt;script&gt;</code> tags it works.
  Any suggestions?</p>