Skip to content

Commit

Permalink
Merge pull request #20276 from bertdeblock/add-missing-closing-bracke…
Browse files Browse the repository at this point in the history
…t-in-router-service-docs

[DOC] Add missing closing bracket in `RouterService` docs
  • Loading branch information
chriskrycho authored Nov 22, 2022
2 parents 74bc861 + f28818f commit af61302
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/@ember/routing/router-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,12 +454,12 @@ class RouterService<R extends Route> extends Service.extend(Evented) {
import Route from '@ember/routing';
import { service } from '@ember/service';
export default class extends Route {
export default class ContactFormRoute extends Route {
@service router;
callback = (transition) => {
callback = (transition) => {
if (!transition.to.find(route => route.name === this.routeName)) {
alert("Please save or cancel your changes.");
alert('Please save or cancel your changes.');
transition.abort();
}
};
Expand All @@ -470,6 +470,7 @@ class RouterService<R extends Route> extends Service.extend(Evented) {
deactivate() {
this.router.off('routeWillChange', this.callback);
}
}
```
Expand Down

0 comments on commit af61302

Please sign in to comment.