Skip to content

Instantly share code, notes, and snippets.

@ponnex
Created May 4, 2018 09:59
Show Gist options
  • Save ponnex/13c02c2a12e29d3a4925b65f3b957e6b to your computer and use it in GitHub Desktop.
Save ponnex/13c02c2a12e29d3a4925b65f3b957e6b to your computer and use it in GitHub Desktop.
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