Skip to content
Snippets Groups Projects
Commit 518bea98 authored by Max Henze's avatar Max Henze
Browse files

Basic Templating

parent eb2bd20b
No related branches found
No related tags found
No related merge requests found
import Controller from '@ember/controller';
import { tracked } from '@glimmer/tracking';
export default class LoginController extends Controller {
@tracked email = '';
@tracked password = '';
}
......@@ -7,4 +7,5 @@ export default class Router extends EmberRouter {
}
Router.map(function() {
this.route('login');
});
import Route from '@ember/routing/route';
export default class LoginRoute extends Route {
}
<div class="grid-x grid-padding-x">
<form class="cell large-2 large-offset-5">
<div class="callout">
<h1>Login</h1>
<label>E-Mail
<Input type="email" @value={{this.email}} />
<span class="form-error is-visible">No user exists with this e-mail address {{this.email}} or the password is not correct.</span>
</label>
<label>Password
<Input type="password" @value={{this.password}} />
<span class="form-error is-visible">No user exists with this e-mail address {{this.email}} or the password is not correct.</span>
</label>
<div class="text-right">
<button class="button">Login</button>
</div>
</div>
</form>
</div>
\ No newline at end of file
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Controller | login', function(hooks) {
setupTest(hooks);
// TODO: Replace this with your real tests.
test('it exists', function(assert) {
let controller = this.owner.lookup('controller:login');
assert.ok(controller);
});
});
import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Route | login', function(hooks) {
setupTest(hooks);
test('it exists', function(assert) {
let route = this.owner.lookup('route:login');
assert.ok(route);
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment