title: New to Sails.js how can I route to a view without including the layout.ejs?
body: <p>New to Sails.js I've read over the docs but I don't see a way to NOT include the <code>layout.ejs</code> located in <code>/views/</code>.</p>
  
  <p>I'm trying to implement Angular into my app and when I go</p>
  
  <pre><code>$routeProvider.when('/',{
    controller: 'HomeController',
    templateUrl: '/home'
  })
  </code></pre>
  
  <p>So then in my routes I expect to be able to do:</p>
  
  <pre><code>'GET /home': { view: 'angular/home.ejs' }
  </code></pre>
  
  <p>But what happens is it loads <code>home.ejs</code> but also injects <code>layout.ejs</code> so it becomes an endless loop of injecting <code>layout.ejs</code> loading angular scripts from layout, then trying to load <code>home.ejs</code> which loads <code>layout.ejs</code> so on so forth</p>
  
  <p>So how can I do this?</p>
  
  <p>I know I can put views in <code>/asset/angular/home.html</code> but I would like to have <code>.ejs</code> so that I can render a different view (e.g. user is not logged in) or something.</p>
  
  <p>Any information on how I can render <code>views</code> without injecting <code>layout.ejs</code> would be great, thanks!</p>
  
  <p>Update:</p>
  
  <p>So by doing this:</p>
  
  <pre><code>'GET /home': { 
    view: 'home',
    locals: {
      layout: false
    }
  }
  </code></pre>
  
  <p>it makes it work, I don't know if there is a global way so I don't have to flag <code>layout: false</code> for each one</p>