Skip to content

Instantly share code, notes, and snippets.

@diegocardoso93
Last active May 20, 2018 11:51
Show Gist options
  • Save diegocardoso93/8a122e2fa503968c9a4a1a5b20d9c8a2 to your computer and use it in GitHub Desktop.
Save diegocardoso93/8a122e2fa503968c9a4a1a5b20d9c8a2 to your computer and use it in GitHub Desktop.
ionic scope visibility and bind example
<ion-header>
<ion-navbar>
<ion-title>
About
</ion-title>
</ion-navbar>
</ion-header>
<ion-content padding>
<p>{{textToBind}}</p>
</ion-content>
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
@Component({
selector: 'page-about',
templateUrl: 'about.html'
})
export class AboutPage {
private textToBind: string;
constructor(public navCtrl: NavController) {
}
ionViewDidLoad() {
this.textToBind = "testandooo";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment