title: Managing state with NativeScript plus Angular
body: <p>I'm a Swift, Objective-C, and C# programmer and I'm trying to learn NativeScript with Angular and TypeScript. I am accustomed to creating a model layer in my applications to maintain application state. Even if I don't save the state to a persisted storage the state is still consistent and available even when I change screens.</p>
  
  <p>After working with NativeScript and Angular, I am wondering if this may not be the same. I am setting value to my model and when I navigate (Angular Router) to a new page, some of it is lost. I have researched this and found little referencing NativeScript, state, and router navigation so I expanded to Single Page Applications with Javascript. In the online book <em>Learning JavaScript Design Patterns</em> published by <em>O'Reilly Media</em> located <a href="https://addyosmani.com/resources/essentialjsdesignpatterns/book/#detailmvc" rel="nofollow">here</a> the author Addy Osmani states: </p>
  
  <blockquote>
    <p>Older texts on MVC may also contain reference to a notion of models
    managing application state.In JavaScript applications state has a
    different connotation, typically referring to the current "state" i.e
    view or sub-view (with specific data) on a users screen at a fixed
    point. State is a topic which is regularly discussed when looking at
    Single-page applications, where the concept of state needs to be
    simulated.</p>
  </blockquote>
  
  <p>So I am speculating that using Angular Router navigation from one page to another page in NativeScript is analogous to navigate from one webpage to another webpage within the same web application. In this case the state must be re-established from a persisted store. Is this a correct assumption or am I still missing something? </p>
  
  <p>Thanks,</p>