mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 07:00:49 +00:00
[Code Style] Avoid retaining reference to window
Avoid https://docs.angularjs.org/error/ng/cpws by changing way reference to is retained. WTD-1482.
This commit is contained in:
parent
3a0ba4f5a6
commit
f8a0ddb484
@ -41,14 +41,16 @@ define(
|
|||||||
context = context || {};
|
context = context || {};
|
||||||
|
|
||||||
this.urlService = urlService;
|
this.urlService = urlService;
|
||||||
this.$window = $window;
|
this.open = function () {
|
||||||
|
$window.open.apply($window, arguments)
|
||||||
|
};
|
||||||
|
|
||||||
// Choose the object to be opened into a new tab
|
// Choose the object to be opened into a new tab
|
||||||
this.domainObject = context.selectedObject || context.domainObject;
|
this.domainObject = context.selectedObject || context.domainObject;
|
||||||
}
|
}
|
||||||
|
|
||||||
NewTabAction.prototype.perform = function () {
|
NewTabAction.prototype.perform = function () {
|
||||||
this.$window.open(
|
this.open(
|
||||||
this.urlService.urlForNewTab("browse", this.domainObject),
|
this.urlService.urlForNewTab("browse", this.domainObject),
|
||||||
"_blank"
|
"_blank"
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user