Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial's context is undefined #135

Open
JuoCode opened this issue Feb 13, 2015 · 0 comments
Open

Partial's context is undefined #135

JuoCode opened this issue Feb 13, 2015 · 0 comments

Comments

@JuoCode
Copy link

JuoCode commented Feb 13, 2015

My partiial _navbar.hbs:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Dawn</title>
</head>
<body>

  <h1>Hello</h1>

  <nav>
    <ul>
      {{#each navbarItems}}
      <li>
        <a href="{{link}}">{{title}}</a>
      </li>
      {{/each}}
    </ul>
  </nav>

My page index.hbs:

{{> navbar }}

<div class="page-index">
  <h4>Home, {{name}}</h4>
</div>

I custome task in Gruntfile.coffee:

// require handlebars
Handlebars = require './vendor/handlebars/handlebars'

// custome task
templates = (require "./.tmp/jst/template")(Handlebars)
html = templates['index']({
  name: 'juo'
  navbarItems: navbarItems
})

Then i log the html, there is no li element in nav > ul

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant