UPDATE: Encountered an issue caused by attempting to iterate over a function's return value using ng-repeat \ ng-options, rather than converting the data into a regular object through a promise.
Here is the code snippet:
$scope.layout.getPartialUriSafe = function(){
return $sceDelegate.getTrusted($sce.RESOURCE_URL, $scope.layout.getPartialUri());
}
$scope.layout.getPartialUri = function(){
var cat = $location.search().cat;
switch(cat){
case 'settings':
return 'partials/companySettings.html';
case 'scouters':
$scope.model.roleType = 'scouter';
$scope.layout.roleTitle = $filter('translate')('SCOUTERS');
return 'partials/roles.html';
case 'recruiters':
$scope.model.roleType = 'recruiter';
$scope.layout.roleTitle = $filter('translate')('RECRUITERS');
return 'partials/roles.html';
case 'social':
return 'partials/socialLinks.html';
case 'design':
return 'partials/companyDesign.html';
default:
return 'partials/companySettings.html';
}
}
HTML:
<div class="settingsInnerContainer">
<div data-ng-include data-src="layout.getPartialUriSafe()"></div>
</div>
The above scenario results in the screen freezing without any error messages displayed.
I attempted using interpolated values like so:
'{{layout.getPartialUriSafe()}}'
However, this resulted in an angular parser error.
I also tried using primitive interpolation with no success:
'{{layout.getPartialUriSafePrimitive}}'
where layout.getPartialUriSafePrimitive contains a string representation of the partial URI.
Thank you in advance for any assistance provided. I've been working on upgrading to ng 1.2.x and have encountered several issues that were resolved in 1.2.2, but this particular challenge remains unresolved.