Runtime View Lifecycle
Typically, you don’t need to manage the application lifecycle with code—Vuforia View handles it automatically in the background. However, in some cases, you might want to control view navigation as part of the experience lifecycle.
View Lifecycle
An experience can include multiple views. Each view can be a 2D overlay or a 3D augmented reality visualization. When using widgets, each view supports one target at a time, with a few advanced exceptions. Users can switch between views by scanning a ThingMark or interacting with the experience. Only one view is active at a time. To navigate between views using JavaScript, use the following JavaScript:
$scope.app.fn.navigate(viewNameID);
To modify settings before a view loads, use the Ionic framework event afterEnter:
$scope.$on("$ionicView.afterEnter", function (event) {}
While JavaScript and the TML API define what appears in a view, event callbacks let the experience respond to what’s happening in real time. For more information, see
Events.