Changes between Version 3 and Version 4 of DeveloperGuidelines/EdenMobile/Routing


Ignore:
Timestamp:
03/30/17 12:16:07 (8 years ago)
Author:
Dominic König
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/EdenMobile/Routing

    v3 v4  
    4141== View and Controller ==
    4242
    43 The role of controllers and views is equivalent to controllers/views in the Sahana Eden web application.
     43The role of controllers and views is equivalent to controllers/views in the Sahana Eden web application. The view template is rendered, and the state controller executed, when the state is first entered (unless reloading is enforced in $state.go, then both would be reloaded).
    4444
    45 The view template is rendered, and the state controller executed when the state is first entered (unless reloading is enforced in $state.go, then both would be reloaded).
     45View and controller in EdenMobile are connected through the AngularJS "model" (=a data object in memory similar to Sahana Eden's ''response''). Access to the "model" is provided by the {{{$scope}}} service, which is why we commonly refer to it as the '''Scope''' rather than the "Model" (also to avoid confusion with database table schemas which are called "models" in Sahana Eden).
    4646
    47 Unlike Sahana Eden view templates, though, placeholders in EdenMobile views are updated whenever the corresponding {{{$scope}}} attribute changes, e.g. a template
     47Note, however, that the scope is not a singleton like ''response'': scopes are hierarchical, and usually upwards-transparent (although they can be fully isolated).
    4848
     49And unlike Sahana Eden ''responses'', placeholders in EdenMobile views are ''updated'' whenever the corresponding {{{$scope}}} attribute changes, e.g. a template like:
    4950{{{#!xml
    5051<!-- in the view: -->