I'm currently working on a ASP.net test SPA (using angular) to understand the concepts.
Essentially, I have my ng-view which loads the views all gravy. However, I've noticed that when a new view is loaded, the controller information is destroyed.
The partial page is as follows:
Dashboard:
<div ng-controller="DashboardController">
{{ DashboardData }}
</div>
However, if I was to reload this partial view, the controller data would be destroyed and its as though the controller gets re-created. eg. I set dashboarddata to "Waffles", reload the dashboard view, and DashboardData is now "".
Is this standard behaviour, and if so, what are the ways I can work around this? Is it bad practice, or is this fairly common?