Hi @O.R.Natale ,
I am not sure what is the application case so that you need extra treatments because when you load a view you can use some global variables which could be a set of all widgets for the specific view - so which is loaded. Possibly you tried this before everty thing was loaded yet. So that you need to use the view enter event - Something like this:
$scope.$on("$ionicView.afterEnter", function (event) {
$scope.myWidgets=$scope.app.view.Home.wdg;
})//this could be added to the home view
/// respectivively
$scope.$on("$ionicView.afterEnter", function (event) {
$scope.myWidgets=$scope.app.view.TEST.wdg;
})//this could be added to the TEST view etc.
alternatively you could create for each view some code which set the current loaded view name to an application parameter
$scope.$on("$ionicView.afterEnter", function (event) {
$scope.app.params.PAR_VIEW=Object.keys(event.targetScope.app.view)[0])
//will set the current loaded view tot the app parameter PAR_VIEW
})
you can add this sniped of code to each view. and later you can do something like this
var wdgs = $scope.app[$scope.app.params.PAR_VIEW].wdg;
which could be get by much more easily in a way like calling:
var wdgs=$scope.view.wdg;