1 つのビュー全体で変数をグローバルにしようとしていますが、できませんでした。
initialize : function(){
this.callParent();
this.nameValue=0;
if(name="ram")
this.nameValue=1;
console.log("Test 1 -"+this.nameValue);
}else {
this.nameValue=0;
console.log("Test 2 -"+this.nameValue);
}
}
次のようなアクセス値フォーム ボタン タップになります。
onSubmitButtonTap: function () {
console.log("Button Tap Here");
console.log("Test Def-6-"+this.nameValue);
}
しかし、私はそれにアクセスできませんでした。常に 0 と表示されます。グローバル変数が正常に機能しませんでした。