0

I'm compiling Ember templates into a JS source file, which loads properly when loaded as an external source in the HTML.

However, when I inline the same source file into the HTML (which is required for the current project), I get the following error on the browser console:

Uncaught Error: Assertion Failed: An error occured while setting up template bindings. Please check "index" template for invalid markup or bindings within HTML comments.

The code of the template that is failing is the following:

<nav class="navbar navbar-default navbar-fixed-top" role="navigation">

    <div class="inner-nav">
        <a class="navbar-brand" rel="home">
            <img src="img/logo.png">
        </a>
    </div>
</nav>

<main class="login">

    <div class="background-image">
        <div class="color-overlay"></div>
    </div>

    <div class="container">
        <aside>
            <h4>Title</h4>

            <p>Intro text, lorem ipsum, lahlahlah, etc.</    p>
        </aside>

        <article>
            <div class="panel panel-default">
                <div class="panel-heading">Sign in</div>
                <div class="panel-body">
                    <form role="form" {{action "login" on="submit"}}>
                        <div class="form-group">
                            <label for="email">Email address</label>
                            {{input placeholder="Your email" id="email" class="form-control"     value=username}}
                        </div>
                        <div class="form-group">
                            <label for="password">Password</label>
                            {{input type="password" placeholder="Your password" id="password"     class="form-control" value=password}}
                        </div>
                        <label class='button-label'><a>Forgot password?</a></label>
                        <button type="submit" class="btn btn-primary pull-right">Sign in</button>
                    </form>
                </div>
            </div>

            <div class="panel panel-default">
                <div class="panel-body">
                    <label class='button-label'>New user?</label>    
                    <button type="submit" class="btn btn-default pull-right">Sign up</button>
                </div>
            </div>
        </article>
    </div>
</main>

Any ideas?

Alberto Rico
  • 397
  • 1
  • 4
  • 21
  • 1
    Have you tried a simple template (e.g. `

    Hello, world

    `)? Are you putting this in `
    – Sam Selikoff Nov 20 '14 at 18:31
  • Yes, I've tried simplifying the template, and the error disappears if I remove the password field. I don't define the 'x/handlebars' type, since I compile it using gulp-ember-templates (it yield JS code that otherwise works if referenced and not inlined. – Alberto Rico Nov 21 '14 at 09:27
  • Did you try just `

    {{password}}

    `? Could just be a closed tag issue
    – Sam Selikoff Nov 21 '14 at 14:57

1 Answers1

0

Try using the classNames attribute in your input helper instead of class and see if that helps.

redOctober13
  • 3,662
  • 6
  • 34
  • 61