doctype html
html
  head
    meta(charset='utf-8')
    meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
    meta(name='viewport', content='width=device-width, initial-scale=1.0')
    title= appName

    for cssFile in cssFiles
      link(rel="stylesheet", href=cssFile)

    // Preloaded Data
    script.
      var apiPath = '/api' + location.pathname;
      var apiPrefetchData = {};
      apiPrefetchData[apiPath] = !{data};
    for jsFile in jsFiles
      script(src=jsFile)
  body(ng-app="blurbs")
    nav.navbar.navbar-default
      .container
        .navbar-header
          a.navbar-brand(ng-href="/blurbs") Blurbs
        ul.nav.navbar-nav.navbar-right(ng-hide="user")
          li
            a.login-link(bs-modal="signupModal" data-template="/html/signup.html" data-animation="am-fade-and-slide-top") Sign Up
          li
            a.login-link(bs-modal="loginModal" data-template="/html/login.html") Log In
        ul.nav.navbar-nav.navbar-right(ng-show="user")
          li
            a#username {{ user.username }}
          li
            a.login-link(ng-controller="userCtrl", ng-click="logout()") Log Out

    .container
      ng-view

    if preloadHTML
      script(type="text/ng-template" id="#{preloadHTMLPath}")
        != preloadHTML

doctype html
html
  head
    meta(charset='utf-8')
    meta(http-equiv='X-UA-Compatible', content='IE=edge,chrome=1')
    meta(name='viewport', content='width=device-width, initial-scale=1.0')
    title= appName

    for cssFile in cssFiles
      link(rel="stylesheet", href=cssFile)

    // Preloaded Data
    script.
      var apiPath = '/api' + location.pathname;
      var apiPrefetchData = !{apiPrefetchData};
    for jsFile in jsFiles
      script(src=jsFile)
  body(ng-app="blurbs")
    nav.navbar.navbar-default
      .container
        .navbar-header
          a.navbar-brand(ng-href="/blurbs") Blurbs
        ul.nav.navbar-nav.navbar-right(ng-hide="user")
          li
            a.login-link(bs-modal="signupModal" data-template="/html/signup.html" data-animation="am-fade-and-slide-top") Sign Up
          li
            a.login-link(bs-modal="loginModal" data-template="/html/login.html") Log In
        ul.nav.navbar-nav.navbar-right(ng-show="user")
          li
            a#username {{ user.username }}
          li
            a.login-link(ng-controller="userCtrl", ng-click="logout()") Log Out

    .container
      ng-view

Use new apiPrefetchData view variable
Use new apiPrefetchData view variable
