Revision 59816
Added by Argiro Kokogiannaki over 3 years ago
advancedSearchForm.component.ts | ||
---|---|---|
5 | 5 |
import {SearchFields} from '../../utils/properties/searchFields'; |
6 | 6 |
import {Dates} from '../../utils/string-utils.class'; |
7 | 7 |
import {EnvProperties} from '../../utils/properties/env-properties'; |
8 |
import {ConfigurationService} from "../../utils/configuration/configuration.service"; |
|
9 | 8 |
import {SearchCustomFilter} from "./searchUtils.class"; |
9 |
import {Subscriber} from "rxjs"; |
|
10 | 10 |
|
11 | 11 |
@Component({ |
12 | 12 |
selector: 'advanced-search-form', |
... | ... | |
41 | 41 |
selectedEntityAdvancedUrl; |
42 | 42 |
@Input() entitiesSelection:boolean; |
43 | 43 |
@Input() showSwitchSearchLink:boolean = true; |
44 |
sub; |
|
44 | 45 |
constructor (private route: ActivatedRoute, private router: Router) { |
45 | 46 |
|
46 | 47 |
} |
47 |
|
|
48 |
ngOnDestroy() { |
|
49 |
if (this.sub instanceof Subscriber) { |
|
50 |
this.sub.unsubscribe(); |
|
51 |
} |
|
52 |
} |
|
48 | 53 |
ngOnInit() { |
49 | 54 |
this.selectedEntity = this.entityType; |
50 |
this.route.data |
|
55 |
this.sub = this.route.data
|
|
51 | 56 |
.subscribe((data: { envSpecific: EnvProperties }) => { |
52 | 57 |
this.properties = data.envSpecific; |
53 | 58 |
|
Also available in: Unified diff
[Library|Trunk]
code clean up:
-remove app.* files from library
-remove unused imports, code, files (Old search pages for results, dataproviders, map search page, etc)
-remove Freeguard from modules
-unsubscribe all subscriptions
-Services: configuration, isvocabularies, user management: unsubscribe from app component or the component that uses them (clearSubscriptions())
-Fetchers: unsubscribe from the component that uses them (clearSubscriptions())