Forked from an inaccessible project.
-
Scott Berg authoredScott Berg authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
favorites-container.component.ts 1.06 KiB
import { Component, OnInit } from '@angular/core';
import { Observable } from 'rxjs';
import { Store, select } from '@ngrx/store';
import { SavedForLaterCourse } from '@app/core/models/saved-for-later-course';
import { GlobalState } from '@app/core/state';
import { getSavedForLaterCourses } from '@app/degree-planner/selectors';
// rsjx / ngrx
import { DegreePlannerState } from '@app/degree-planner/state';
// Selectors
import {
getDropZones
} from '@app/degree-planner/selectors';
@Component({
selector: 'cse-favorites-container',
templateUrl: './favorites-container.component.html',
styleUrls: ['./favorites-container.component.scss']
})
export class SavedForLaterContainerComponent implements OnInit {
public courses$: Observable<SavedForLaterCourse[]>;
public dropZones$: Observable<String[]>;
constructor(private store: Store<{ degreePlanner: DegreePlannerState }>) {}
public ngOnInit() {
this.dropZones$ = this.store.pipe(select(getDropZones));
this.courses$ = this.store.pipe(select(getSavedForLaterCourses));
}
drop(event) {
console.log(event);
}
}