Skip to content

Instantly share code, notes, and snippets.

View tuanngo's full-sized avatar
🎯
Focusing

Tuan Ngo tuanngo

🎯
Focusing
  • HCM, Việt Nam
  • 03:12 (UTC +07:00)
View GitHub Profile
@tuanngo
tuanngo / UserModule.ts
Created April 3, 2018 15:08 — forked from ValentinFunk/UserModule.ts
@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)