-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schematics): create facade skeleton when creating an extension
Closes #109
- Loading branch information
Showing
2 changed files
with
15 additions
and
1 deletion.
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
13 changes: 13 additions & 0 deletions
13
...matics/src/extension/files/__name@dasherize__/facades/__name@dasherize__.facade.__tsext__
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Injectable } from '@angular/core'; | ||
import { Store, select } from '@ngrx/store'; | ||
|
||
import { get<%= classify(name) %>State } from '../store/<%= dasherize(name) %>-store'; | ||
|
||
// tslint:disable:member-ordering | ||
@Injectable({ providedIn: 'root' }) | ||
export class <%= classify(name) %>Facade { | ||
constructor(private store: Store<{}>) {} | ||
|
||
// example for debugging | ||
<%= camelize(name) %>State$ = this.store.pipe(select(get<%= classify(name) %>State)); | ||
} |