Skip to content

Instantly share code, notes, and snippets.

View sharikovvladislav's full-sized avatar
🎯
Focusing

Sharikov Vladislav sharikovvladislav

🎯
Focusing
View GitHub Profile
@ValentinFunk
ValentinFunk / UserModule.ts
Last active October 9, 2018 19:26
@ngrx/store and @ng-bootstrap/ng-bootstrap NgbModal
@NgModule({...})
export class UserModule {
constructor(
ngbModal: NgbModal,
modalService: ModalService,
store: Store<AppState>
) {
// Disallow closing the login modal if user is accessing a protected route as first page.
// (else they would get an empty page due to the auth guard)
let loginModalOptions = store.select(x => x.user.loginRequired)