Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 3187051

Browse files
committed
feat: add operators in lazy loaded module
1 parent eaac69a commit 3187051

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,29 @@
11
import {Component, OnInit} from '@angular/core';
22
import {NavService} from '../../../nav.service';
33
import {UsersService} from '../../../users.service';
4+
import {of} from 'rxjs/observable/of';
5+
import {take} from 'rxjs/operators';
46

57
@Component({
68
selector: 'app-free',
79
templateUrl: './free.component.html',
810
styleUrls: ['./free.component.scss']
911
})
1012
export class FreeComponent implements OnInit {
13+
data: Array<Object>;
1114

1215
constructor(public usersService: UsersService,
1316
public navService: NavService) {
1417
navService.backRoute = [];
1518
navService.title = 'Research Tool Info';
1619
}
1720

18-
ngOnInit() {}
19-
20-
login() {
21-
this.usersService.login();
21+
ngOnInit() {
22+
// Just adding in some operators since they were all removed from this lazy loaded module when making a public example
23+
of([])
24+
.pipe(
25+
take(1)
26+
)
27+
.subscribe(data => this.data = data);
2228
}
2329
}

0 commit comments

Comments
 (0)