-
Couldn't load subscription status.
- Fork 5
feat: implement libavoid example in angular #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: angular-libavoid
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe better to call this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should keep the name with the word "Service" since that is what is used in all the tutorials and hopefully it makes it clear that other libraries (which may need to call the service in the component) can be used in this way |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { Injectable } from '@angular/core'; | ||
| import { AvoidRouter } from '../shared/avoid-router'; | ||
|
|
||
| @Injectable({ | ||
| providedIn: 'root' | ||
| }) | ||
| export class AvoidRouterService { | ||
| public isLoaded: boolean; | ||
|
|
||
| constructor() {} | ||
|
|
||
| load(): Promise<any> { | ||
|
|
||
| const promise = AvoidRouter.load() | ||
| .then(() => { | ||
| this.isLoaded = true; | ||
| return true; | ||
| }); | ||
|
|
||
| return promise; | ||
| } | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.