mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
chore: fix detach typos in overlay and portal (#1840)
This commit is contained in:
@@ -33,12 +33,12 @@ export class OverlayRef implements PortalHost {
|
||||
}
|
||||
|
||||
detach(): Promise<any> {
|
||||
this._detatchBackdrop();
|
||||
this._detachBackdrop();
|
||||
return this._portalHost.detach();
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
this._detatchBackdrop();
|
||||
this._detachBackdrop();
|
||||
this._portalHost.dispose();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ export class OverlayRef implements PortalHost {
|
||||
}
|
||||
|
||||
/** Detaches the backdrop (if any) associated with the overlay. */
|
||||
private _detatchBackdrop(): void {
|
||||
private _detachBackdrop(): void {
|
||||
let backdropToDetach = this._backdropElement;
|
||||
|
||||
if (backdropToDetach) {
|
||||
|
||||
@@ -97,7 +97,7 @@ export class PortalHostDirective extends BasePortalHost implements OnDestroy {
|
||||
return new Map<string, any>();
|
||||
}
|
||||
|
||||
/** Detatches the currently attached Portal (if there is one) and attaches the given Portal. */
|
||||
/** Detaches the currently attached Portal (if there is one) and attaches the given Portal. */
|
||||
private _replaceAttachedPortal(p: Portal<any>): void {
|
||||
if (this.hasAttached()) {
|
||||
this.detach();
|
||||
|
||||
@@ -56,7 +56,7 @@ export abstract class Portal<T> {
|
||||
|
||||
/**
|
||||
* Sets the PortalHost reference without performing `attach()`. This is used directly by
|
||||
* the PortalHost when it is performing an `attach()` or `detatch()`.
|
||||
* the PortalHost when it is performing an `attach()` or `detach()`.
|
||||
*/
|
||||
setAttachedHost(host: PortalHost) {
|
||||
this._attachedHost = host;
|
||||
|
||||
Reference in New Issue
Block a user