backstack icon indicating copy to clipboard operation
backstack copied to clipboard

StackNavigator View instances don't retain custom properties of Views?

Open jaypeeZero opened this issue 13 years ago • 0 comments

Quick example:

var View1 = new Backbone.View.extend({
   initialize: function() {
      this.title = "View 1";
   }
};

var View2 = new Backbone.View.extend({
   initialize: function() {
      this.options.title = "View 2";
   }
}

navigator.pushView(View2);
navigator.pushView(View1);

At this point if you examine navigator.viewsStack you will see that "View2" has "options.title" set, but "View1" does not have "title" set.
Obviously I can use "options" if I need to but to have to set options on every value I want to be useable from my StackNavigator instance seems a bit excessive.

jaypeeZero avatar Aug 01 '12 11:08 jaypeeZero