Skip to content

Commit

Permalink
update templates in README
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoow committed Mar 19, 2020
1 parent 08f317e commit 747ddea
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ export default class ApplicationController extends Controller {
{{!-- app/templates/application.hbs --}}
<div class="menu">
{{#if session.isAuthenticated}}
<a {{action 'invalidateSession'}}>Logout</a>
{{#if this.session.isAuthenticated}}
<a {{on "click" this.invalidateSession}}>Logout</a>
{{else}}
{{#link-to 'login'}}Login{{/link-to}}
{{/if}}
Expand Down Expand Up @@ -182,14 +182,14 @@ With that authenticator and a login form like

```handlebars
{{!-- app/templates/login.hbs --}}
<form {{action 'authenticate' on='submit'}}>
<form {{on "submit" this.authenticate}}>
<label for="identification">Login</label>
{{input id='identification' placeholder='Enter Login' value=identification}}
<input placeholder="Enter Login" value={{this.identification}} {{on "change" this.updateIdentification}}>
<label for="password">Password</label>
{{input id='password' placeholder='Enter Password' type='password' value=password}}
<input placeholder="Enter Password" value={{this.password}} {{on "change" this.updatePassword}}>
<button type="submit">Login</button>
{{#if errorMessage}}
<p>{{errorMessage}}</p>
{{#if this.errorMessage}}
<p>{{this.errorMessage}}</p>
{{/if}}
</form>
```
Expand Down

0 comments on commit 747ddea

Please sign in to comment.