Skip to content

Instantly share code, notes, and snippets.

@isaacplmann
Last active April 10, 2017 18:17
Show Gist options
  • Save isaacplmann/d2ad2eeacf515dc1dc4eedbd11124577 to your computer and use it in GitHub Desktop.
Save isaacplmann/d2ad2eeacf515dc1dc4eedbd11124577 to your computer and use it in GitHub Desktop.
@Directive({ selector: '[rangerListData]' })
export class RangerListDataDirective extends ConnectRequestDirective {
constructor(private connect: ConnectService, @Optional() public host: NqConnectedComponent) {
super(connect, host);
this.config = Object.assign(
{},
// config object defining http request and how to store the response data in the local cache (i.e. ngrx store)
createGetRangerListQuery(),
{ selector: rangerListSelector }
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment