angularjs - angular 1.2, how would a router load views without making get calls? -


i've been going on current (angular 1.2.16) routing , multiple views method angular. detailed here. in see every route there request load partial html.

how change requests views happen when app instantiates , routes switch views without making further calls server?

suppose want change content of div depending on stored in data.mode. need have first mechanism change value of data.mode , that's entirely you.

<div ng-switch on="data.mode">     <div ng-switch-when="first_value">         <!--your first partial page content-->     </div>      <div ng-switch-when="second_value">         <!--your second partial page-->     </div>      <div ng-switch-when="second_value">         <!--your third partial page-->     </div>      <div ng-switch-default>         <!--default content when no match found.-->     </div> </div> 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -