Created
May 4, 2018 09:59
-
-
Save ponnex/13c02c2a12e29d3a4925b65f3b957e6b to your computer and use it in GitHub Desktop.
This file contains 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
import { Component, OnInit, ViewChild, ElementRef } from "@angular/core"; | |
import { NavigationService } from "../../services/navigation/navigation.service"; | |
import { Image } from "ui/image"; | |
import { EventData } from "tns-core-modules/ui/page/page"; | |
@Component({ | |
selector: "products", | |
moduleId: module.id, | |
templateUrl: "./products.component.html", | |
styleUrls: ["./products.component.scss"] | |
}) | |
export class ProductsComponent implements OnInit { | |
// This pattern makes use of Angular’s dependency injection implementation to inject an instance of the ItemService service into this class. | |
// Angular knows about this service because it is included in your app’s main NgModule, defined in app.module.ts. | |
constructor( | |
private _navigationService: NavigationService | |
) { } | |
ngOnInit(): void { | |
} | |
public consumerOccasions: string = "cokeSS"; | |
onAvailableTap(args: EventData){ | |
let image = <Image>args.object; | |
image.className = "product-image product-marked"; | |
} | |
cokeSSTap(){ | |
this.consumerOccasions = "cokeSS"; | |
console.log(this.consumerOccasions); | |
} | |
flavorSSTap(){ | |
this.consumerOccasions = "flavorSS"; | |
console.log(this.consumerOccasions); | |
} | |
cokeMSTap(){ | |
this.consumerOccasions = "cokeMS"; | |
console.log(this.consumerOccasions); | |
} | |
waterSSTap(){ | |
this.consumerOccasions = "waterSS"; | |
console.log(this.consumerOccasions); | |
} | |
onProceedToPriceComplianceTap(){ | |
this._navigationService.navigateToPriceCompliancePage(true); | |
} | |
onTapBack(){ | |
this._navigationService.navigateToStoreInfoPage(true); | |
} | |
goBack(){ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment