Skip to content

Commit

Permalink
MOBILE-4587 core: Remove unused ion-content from core-link
Browse files Browse the repository at this point in the history
  • Loading branch information
dpalou committed Jul 30, 2024
1 parent e922234 commit b2a70de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions src/core/directives/format-text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import {
Inject,
ChangeDetectorRef,
} from '@angular/core';
import { IonContent } from '@ionic/angular';

import { CoreSites } from '@services/sites';
import { CoreDomUtils } from '@services/utils/dom';
Expand Down Expand Up @@ -104,7 +103,6 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec

constructor(
element: ElementRef,
@Optional() protected content: IonContent,
protected viewContainerRef: ViewContainerRef,
@Optional() @Inject(CORE_REFRESH_CONTEXT) protected refreshContext?: CoreRefreshContext,
) {
Expand Down Expand Up @@ -503,8 +501,8 @@ export class CoreFormatTextDirective implements OnChanges, OnDestroy, AsyncDirec
return;
}

// Angular 2 doesn't let adding directives dynamically. Create the CoreLinkDirective manually.
const linkDir = new CoreLinkDirective(new ElementRef(anchor), this.content);
// Angular doesn't let adding directives dynamically. Create the CoreLinkDirective manually.
const linkDir = new CoreLinkDirective(new ElementRef(anchor));
linkDir.capture = this.captureLinks ?? true;
linkDir.inApp = this.openLinksInApp;
linkDir.ngOnInit();
Expand Down
4 changes: 1 addition & 3 deletions src/core/directives/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

import { Directive, Input, OnInit, ElementRef, Optional, SecurityContext } from '@angular/core';
import { Directive, Input, OnInit, ElementRef, SecurityContext } from '@angular/core';
import { SafeUrl } from '@angular/platform-browser';
import { IonContent } from '@ionic/angular';

import { CoreFileHelper } from '@services/file-helper';
import { CoreSites } from '@services/sites';
Expand Down Expand Up @@ -47,7 +46,6 @@ export class CoreLinkDirective implements OnInit {

constructor(
element: ElementRef,
@Optional() protected content: IonContent,
) {
this.element = element.nativeElement;
}
Expand Down

0 comments on commit b2a70de

Please sign in to comment.