mirror of
https://github.com/nasa/openmct.git
synced 2025-02-20 17:33:23 +00:00
[Folder] List view load fix (#2069)
* [Folder] List view load fix -List view data takes long time to display, has to do with Angular not triggering its digestive cycle when switching views -Resolved issue by explicitly triggering the digestive cycle -Fixes issue #2067 * Added comment to clarify code addition fix #2069
This commit is contained in:
parent
45a152df86
commit
b187762d55
@ -32,6 +32,11 @@ define(function () {
|
||||
|
||||
this.utc = formatService.getFormat('utc');
|
||||
|
||||
//Trigger digestive cycle with $apply to update list view
|
||||
setTimeout(function () {
|
||||
$scope.$apply();
|
||||
});
|
||||
|
||||
$scope.$on('$destroy', function () {
|
||||
unlisten();
|
||||
});
|
||||
|
@ -104,7 +104,7 @@ define(
|
||||
|
||||
scope = jasmine.createSpyObj(
|
||||
"$scope",
|
||||
["$on"]
|
||||
["$on", "$apply"]
|
||||
);
|
||||
scope.domainObject = domainObject;
|
||||
|
||||
@ -146,6 +146,7 @@ define(
|
||||
runs(function () {
|
||||
expect(scope.children.length).toEqual(0);
|
||||
});
|
||||
expect(scope.$apply).toHaveBeenCalled();
|
||||
});
|
||||
it("releases listeners on $destroy", function () {
|
||||
expect(scope.$on).toHaveBeenCalledWith('$destroy', jasmine.any(Function));
|
||||
|
Loading…
x
Reference in New Issue
Block a user