File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,11 @@ import Controller from '@ember/controller';
2
2
import { action } from '@ember/object' ;
3
3
4
4
export default class CatchAllController extends Controller {
5
- @action reload ( event ) {
6
- event . preventDefault ( ) ;
5
+ @action reload ( ) {
7
6
this . model . transition . retry ( ) ;
8
7
}
8
+
9
+ @action back ( ) {
10
+ history . back ( ) ;
11
+ }
9
12
}
Original file line number Diff line number Diff line change 15
15
}
16
16
17
17
.link {
18
+ composes : button-reset from '../styles/shared/buttons.module.css' ;
19
+ composes : link from '../styles/application.module.css' ;
18
20
font-weight : 500 ;
19
21
}
Original file line number Diff line number Diff line change 5
5
<h1 local-class =" title" data-test-title>{{ or @model.title " Page not found" }} </h1 >
6
6
7
7
{{ #if @model.tryAgain }}
8
- <a href = " javascript:location.reload() " local-class =" link" data-test-try-again {{ on " click" this.reload }} >Try Again</a >
8
+ <button type = " button " local-class =" link" data-test-try-again {{ on " click" this.reload }} >Try Again</button >
9
9
{{ else }}
10
- <a href = " javascript:history.back() " local-class =" link" data-test-go-back>Go Back</a >
10
+ <button type = " button " local-class =" link" data-test-go-back {{ on " click " this.back }} >Go Back</button >
11
11
{{ /if }}
12
12
</div >
13
13
</div >
You can’t perform that action at this time.
0 commit comments