Hi, I am new to this forum and also to Ionic 3. I am developing an application with ionic 3
I am struggling with the following problem and I hope someone can help me:
I want to hide a div on my HTML page after clicking on a button. In another post, I have read that this should work with ng-hide but for some reason, this does not work for me.
My html looks like following
Hideme: {{hideMe}}
Hide this
<button ion-button large (click)="hideDiv()">Hide List</button>
My .ts file code is this.
export class MyPage { myValue:Boolean=false; hideMe=false; constructor(public navCtrl: NavController, public navParams: NavParams) { } hideDiv(){ this.hideMe=true; } }
If I click the button this.hideme becomes true, the variable value changes also on the html page but the div still stays visible. Am I missing something or what is the proper way to do this?
Question and answer is powered by AnsPress.io