Skip to content

Instantly share code, notes, and snippets.

@leetheguy
Last active February 23, 2017 10:38
Show Gist options
  • Select an option

  • Save leetheguy/ca1ecced2476e28634db36e2893b4f81 to your computer and use it in GitHub Desktop.

Select an option

Save leetheguy/ca1ecced2476e28634db36e2893b4f81 to your computer and use it in GitHub Desktop.
illustrating getters and setters
import { Component } from '@angular/core';
import { NavController, NavParams } from 'ionic-angular';
@Component({
selector: 'page-settings',
templateUrl: 'settings.html'
})
export class SettingsPage {
pomLengthValue: number;
shortBreakLengthValue: number;
longBreakLengthValue: number;
constructor(public navCtrl: NavController, public navParams: NavParams) {
pomLengthValue = 25;
shortBreakLengthValue = 5;
longBreakLengthValue = 30;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment