[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:
Today, to get a static value of a loading or error i need to do something like that:
@Injectable({ providedIn: "root" })
export class Query extends QueryEntity {
loading$ = this.selectLoading();
constructor(protected store: Store) {
super(store);
}
}
const { loading } = this.query.loading$.source.source.source.getValue()
I think that will be awesome if exist a way to get the static value of loading and error, aka:
this.query.getLoading() or this.quey.getError()
I need to use in a conditional of another context if the store are loading in that moment
Angular version: 8.2.14
For Tooling issues:
- Node version: v10.16.0
- Platform: Windows
You can simply call store.getValue().loading/error.
Those props exist on the root object of your state
On Wed, Feb 5, 2020, 22:13 Nathan Gabriel notifications@github.com wrote:
I'm submitting a...
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x] Support request
[ ] Other... Please describe:Current behavior
Today, to get a static value of a loading or error i need to do something
like that:@Injectable({ providedIn: "root" })
export class Query extends QueryEntity {
loading$ = this.selectLoading();constructor(protected store: Store) {
super(store);
}
}const { loading } = this.query.loading$.source.source.source.getValue()
Expected behaviorI think that will be awesome if exist a way to get the static value of
loading and error, aka:
this.query.getLoading() or this.quey.getError()
What is the motivation / use case for changing the behavior?I need to use in a conditional of another context if the store are loading
in that moment
EnvironmentAngular version: 8.2.14
For Tooling issues:
- Node version: v10.16.0
- Platform: Windows
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/datorama/akita/issues/370?email_source=notifications&email_token=ABRCXZW3EJF4UGEPIUQR4ZDRBMMYDA5CNFSM4KQRLEJKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ILKEBQA,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABRCXZR7SQEFV67T4VCQUDDRBMMYDANCNFSM4KQRLEJA
.
@danzrou
Sorry, i'm talking about Entity Store and don't exist this method :c
Use query.getValue().loading.
You can add it to your query:
class YourQuery extends QueryEntity {
getLoading() {
return this.getValue().loading;
}
}
Most helpful comment
You can add it to your query: