-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial changes to enable localstorage
- Loading branch information
1 parent
1ba83ad
commit b8ab9a5
Showing
6 changed files
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
import { ActivatedRouteSnapshot, Resolve, RouterStateSnapshot } from '@angular/router'; | ||
import { Injectable } from '@angular/core'; | ||
import { Observable } from 'rxjs'; | ||
import { SavedCanvas, SavedCanvasService } from './saved-canvas.service'; | ||
|
||
@Injectable({providedIn: 'root'}) | ||
export class SavedCanvasResolver implements Resolve<SavedCanvas> { | ||
constructor(private service: SavedCanvasService) { } | ||
|
||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<SavedCanvas> | Promise<SavedCanvas> | SavedCanvas { | ||
async resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<SavedCanvas> { | ||
return this.service.getCanvas(route.paramMap.get('id')); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters