Skip to content

Commit

Permalink
fix(lib): remove circular refs in IoService
Browse files Browse the repository at this point in the history
fix #480
  • Loading branch information
gund committed Sep 1, 2022
1 parent b91c9ae commit 6d225e6
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { ComponentRef } from '@angular/core';

export interface DynamicComponentInjector {
componentRef: ComponentRef<unknown> | null;
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './component-injector';
export * from './token';
export * from './component-outlet';
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { ComponentRef, InjectionToken } from '@angular/core';

export interface DynamicComponentInjector {
componentRef: ComponentRef<unknown> | null;
}
import { InjectionToken } from '@angular/core';
import { DynamicComponentInjector } from './component-injector';

export const DynamicComponentInjectorToken =
new InjectionToken<DynamicComponentInjector>('DynamicComponentInjector');
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @angular-eslint/component-selector */
import { Component, ComponentRef, Type, ViewChild } from '@angular/core';
import { TestSetup } from '../../../test';
import { TestSetup } from '../../test';
import { ComponentOutletInjectorDirective } from './component-outlet-injector.directive';

describe('ComponentOutletInjectorDirective', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ComponentRef, Directive, Host } from '@angular/core';
import {
DynamicComponentInjector,
DynamicComponentInjectorToken,
} from '../token';
} from '../component-injector';

@Directive({
// eslint-disable-next-line @angular-eslint/directive-selector
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @angular-eslint/component-selector */
import { Component, EventEmitter, Input, Output, Type } from '@angular/core';
import { TestSetup } from '../../../test';
import { TestSetup } from '../../test';
import { ComponentOutletInjectorDirective } from './component-outlet-injector.directive';
import { ComponentOutletIoDirective } from './component-outlet-io.directive';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Directive, DoCheck, Input } from '@angular/core';

import { InputsType, IoService, OutputsType } from '../../io';
import { InputsType, IoService, OutputsType } from '../io';

@Directive({
selector:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @angular-eslint/component-selector */
import { Component, Type } from '@angular/core';
import { TestFixture, TestSetup } from '../../test';
import { ComponentOutletInjectorDirective } from '../component-injector';
import { ComponentOutletInjectorDirective } from '../component-outlet';
import { DynamicComponent as NdcDynamicComponent } from '../dynamic.component';
import {
AttributesMap,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { ComponentOutletInjectorModule } from '../component-injector';
import { ComponentOutletInjectorModule } from '../component-outlet';
import { DynamicAttributesDirective } from './dynamic-attributes.directive';

@NgModule({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
} from '@angular/core';

import { TestFixture, TestSetup } from '../../test';
import { ComponentOutletInjectorDirective } from '../component-injector';
import { ComponentOutletInjectorDirective } from '../component-outlet';
import { DynamicComponent as NdcDynamicComponent } from '../dynamic.component';
import { IoFactoryService } from '../io';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { ComponentOutletInjectorModule } from '../component-injector';
import { ComponentOutletInjectorModule } from '../component-outlet';
import { DynamicDirectivesDirective } from './dynamic-directives.directive';

@NgModule({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
import { TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { TestFixture, TestSetup } from '../../test';
import { ComponentOutletInjectorModule } from '../component-injector';
import { ComponentOutletInjectorModule } from '../component-outlet';
import { DynamicComponent as NdcDynamicComponent } from '../dynamic.component';
import { InputsType, IoEventArgumentToken, OutputsType } from '../io';
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';

import { ComponentOutletInjectorModule } from '../component-injector';
import { ComponentOutletInjectorModule } from '../component-outlet';
import { DynamicIoDirective } from './dynamic-io.directive';

@NgModule({
Expand Down
1 change: 1 addition & 0 deletions projects/ng-dynamic-component/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

export * from './lib/io';
export * from './lib/component-injector';
export * from './lib/component-outlet';
export * from './lib/dynamic.module';
export * from './lib/dynamic.component';
export * from './lib/dynamic-io';
Expand Down

0 comments on commit 6d225e6

Please sign in to comment.