Ember templates, error when inlined in HTML, after compiled

579 views Asked by At

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?

1

There are 1 answers

0
redOctober13 On

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