import { Component } from '@angular/core' ; import { NavParams , ViewController } from 'ionic-angular' ; @ Component ( { selector : 'page-products-filter' , templateUrl : 'products-filter.html' } ) export class ProductsFilterPage { filters : Array < any > = [ ] ; constructor ( public navParams , public viewCtrl ) { this . filters = [ { "name" : "Free Shiping" , "isChecked" : false } , { "name" : "Fulfilled by vPlanet" , "isChecked" : true } , { "name" : "In Stock" , "isChecked" : true } ] ; } resetFilters ( ) { this . filters . forEach ( track => { track . isChecked = true ; } ) ; } applyFilters ( ) { this . dismiss ( ) ; } dismiss ( data ? ) { this . viewCtrl . dismiss ( data ) ; } }