This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class GameOfLife { | |
| board: boolean[][]; | |
| constructor(board: boolean[][]) { | |
| this.board = board; | |
| } | |
| private createMatrix(width: number, height: number): boolean[][] { | |
| const matrix: boolean[][] = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const imports = [ | |
| foo, | |
| bar, | |
| fizz, | |
| buzz | |
| ]; | |
| // OR | |
| const imports = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //original | |
| getParamsFromForm(formGroup) { | |
| return { | |
| location: | |
| formGroup.controls.location && formGroup.controls.location.value ? formGroup.controls.location.value : '', | |
| locationOperation: formGroup.controls.location && formGroup.controls.location.value ? 'QueryString' : '', | |
| specialty: | |
| formGroup.controls.specialty && formGroup.controls.specialty.value ? formGroup.controls.specialty.value : '', | |
| name: formGroup.controls.name && formGroup.controls.name.value ? formGroup.controls.name.value : '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class SuperSpecialtyPage { | |
| public title: string; | |
| public subNavigation: any; | |
| public heroItems: any; | |
| public icons: any; | |
| public sspActiveTab: any; | |
| public subSpecialties: any; | |
| public featuredContent: any; | |
| public awards: any; | |
| public conditionFinder: any; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.activatedRoute.snapshot.data['data'].subscribe((routeInfo) => { | |
| const includes = ['field_to_include']; | |
| this.jsona.getIndividual(routeInfo.jsonapi.individual, includes).subscribe(pageContent => { | |
| // you now have your content | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.activatedRoute.snapshot.data['data'].subscribe((routeInfo) => { | |
| const uuid = routeInfo.entity.uuid; | |
| const $linkLandingPageContent = this.linkLandingPageService.getContent(uuid); | |
| $linkLandingPageContent.subscribe((content) => { | |
| this.linkLandingPage = content; | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.activatedRoute.snapshot.data['data'].subscribe((routeInfo) => { | |
| const uuid = routeInfo.entity.uuid; | |
| const $homepageContent = this.homepageService.getContent(uuid); | |
| $homepageContent.subscribe((content) => { | |
| this.content = content; | |
| }); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const designatedCommentContactUID = null; | |
| if (this.data['field_designated_comment_contact']?.length) { | |
| designatedCommentContactUID = this.data['field_designated_comment_contact'][0].target_id; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const designatedCommentContactUID = this.data['field_designated_comment_contact']?.length ? this.data['field_designated_comment_contact'][0].target_id : null; | |
| // or if your linter doesn't like long lines | |
| const designatedCommentContactUID = this.data['field_designated_comment_contact']?.length | |
| ? this.data['field_designated_comment_contact'][0].target_id | |
| : null; | |
| const designatedCommentContactUID = this.data['field_designated_comment_contact']?.length | |
| ? this.data['field_designated_comment_contact'][0]?.target_id |