; promblem

Hello, i have question about;

rule(idx) {
if(idx == 0) {, {“type”:“rules1”});
} else if(idx == 1) {, {“type”:“rules2”});
console.log("page id is: " +;

this is my *.ts code and when i click the rule(idx == 1)
RulesPage type is not change at all.

These are my RulesPage .

<ng-template [ngIf]=“type == ‘rules1’”> blahblahblah A
<ng-template [ngIf]=“type == ‘rules2’”> blahblahblah A

export class RulesPage {
public type = ‘rules1’;
public header_data:any;
constructor(public navCtrl: NavController, public params: NavParams, public menu:MenuController) {
ionViewDidEnter() {
// the root left menu should be disabled on the tutorial page;

i click the rule(2) and check the console.
It shows “(getRootNav) is deprecated and will be removed in the next major release. Use getRootNavById instead.”

How can i work “rule(2)” and RulesPage type is changed ?