function logout() { // remove user from local storage to log user out localStorage.removeItem('currentUser'); currentUserSubject.next(null); }
getProblems(): Observable<Problem[]> { this.httpClient.get('api/v1/problems') .toPromise() .then((res: any) => { this._problemSource.next(res); }) .catch(this.handleError); return this._problemSource.asObservable(); }
findTopic(topic: string) { return ( this.topics.getValue().filter((t) => t.topic === topic)[0] || function () { throw new Error(`Ipfs pubsub -> Missing topic: ${topic}`); } ); }
set_account_token ( token : any ) { this.account_token = token; this.account_token_subject.next ( this.account_token ); }
on_mousemove ( event ) : string { let retval = this.get_element_type ( event ); if ( this.content_current !== retval ) { this.content_current = retval; this.content_subject.next ( this.content_current ); } return retval; }
private resizeFn ( e: any ) { let adjusted_height: number = e ? e.target.innerHeight : this.current_height; adjusted_height -= this.get_height_header ( ); adjusted_height -= this.get_height_footer ( ); if ( 0 > adjusted_height ) adjusted_height = 240; this.current_height = adjusted_height; this.content_height = `${adjusted_height}px`; this.content.next ( adjusted_height ); }
update() { const sort = this.appConfig.sort$.value; const matches = sort.sortBy === this.prop; this.asc = matches && sort.order < 0; this.desc = matches && sort.order > 0; }
export function injectEpics(key: string, newEpics: Epic<Action, LifeStore>, newDependencies?: {}): void { Object.assign(dependencies, newDependencies); epics.next(newEpics); // newEpics.map((epic: Epic<Action, LifeStore>) => epics.next(epic)); console.log(`${key} page Epic is loaded!`); }
set_account_token ( token : any ) { this.account_token = token; this.account_token_subject.next ( this.account_token ); }
function logout() { // remove user from local storage to log user out localStorage.removeItem('currentUser'); currentUserSubject.next(null); }
set_account_token ( token : any ) { this.account_token = token; this.account_token_subject.next ( this.account_token ); }
private resizeFn ( e: any ) { let adjusted_height: number = e ? e.target.innerHeight : this.current_height; adjusted_height -= this.get_height_header ( ); adjusted_height -= this.get_height_footer ( ); if ( 0 > adjusted_height ) adjusted_height = 240; this.current_height = adjusted_height - 6; this.content_height = `${adjusted_height}px`; this.content.next ( adjusted_height ); }