diff --git a/src/app/components/main/sections/game-page/game-page.component.html b/src/app/components/main/sections/game-page/game-page.component.html index 2edbe48..c4eafda 100644 --- a/src/app/components/main/sections/game-page/game-page.component.html +++ b/src/app/components/main/sections/game-page/game-page.component.html @@ -47,7 +47,7 @@ - + Play diff --git a/src/app/components/main/sections/game-page/game-page.component.ts b/src/app/components/main/sections/game-page/game-page.component.ts index b9bec65..c1d80c7 100644 --- a/src/app/components/main/sections/game-page/game-page.component.ts +++ b/src/app/components/main/sections/game-page/game-page.component.ts @@ -5,6 +5,7 @@ import { PopupService } from 'projects/ui/src/lib/popup/popup.service' import { Subscription } from 'rxjs' import { Game } from 'src/app/interfaces/game.interface' import { UiService } from 'src/app/services/ui.service' +import { LauncherService } from 'src/app/services/launcher.service'; @Component({ selector: 'app-game-page', @@ -43,10 +44,17 @@ export class GamePageComponent implements OnInit, OnDestroy { constructor( private router: Router, + private launcher: LauncherService, + // 4. Импортировать сервис для попап окон private popup: PopupService ) {} + run(game: Game) { + //console.log('Game to run ' + game.title) + this.launcher.RunGame(game) + } + ngOnInit(): void { this.observeNavigation() }