@@ -20,8 +20,6 @@ import {
2020
2121import { NavParams } from '../directives/navigation/nav-params' ;
2222
23- import { ConfigToken } from './config' ;
24-
2523// Token for injecting the modal element
2624export const IonModalToken = new InjectionToken < HTMLIonModalElement > ( 'IonModalToken' ) ;
2725
@@ -31,7 +29,6 @@ export const IonModalToken = new InjectionToken<HTMLIonModalElement>('IonModalTo
3129export class AngularDelegate {
3230 private zone = inject ( NgZone ) ;
3331 private applicationRef = inject ( ApplicationRef ) ;
34- private config = inject ( ConfigToken ) ;
3532
3633 create (
3734 environmentInjector : EnvironmentInjector ,
@@ -43,8 +40,7 @@ export class AngularDelegate {
4340 injector ,
4441 this . applicationRef ,
4542 this . zone ,
46- elementReferenceKey ,
47- this . config . useSetInputAPI ?? false
43+ elementReferenceKey
4844 ) ;
4945 }
5046}
@@ -58,8 +54,7 @@ export class AngularFrameworkDelegate implements FrameworkDelegate {
5854 private injector : Injector ,
5955 private applicationRef : ApplicationRef ,
6056 private zone : NgZone ,
61- private elementReferenceKey ?: string ,
62- private enableSignalsSupport ?: boolean
57+ private elementReferenceKey ?: string
6358 ) { }
6459
6560 attachViewToDom ( container : any , component : any , params ?: any , cssClasses ?: string [ ] ) : Promise < any > {
@@ -92,8 +87,7 @@ export class AngularFrameworkDelegate implements FrameworkDelegate {
9287 component ,
9388 componentProps ,
9489 cssClasses ,
95- this . elementReferenceKey ,
96- this . enableSignalsSupport
90+ this . elementReferenceKey
9791 ) ;
9892 resolve ( el ) ;
9993 } ) ;
@@ -130,8 +124,7 @@ export const attachView = (
130124 component : any ,
131125 params : any ,
132126 cssClasses : string [ ] | undefined ,
133- elementReferenceKey : string | undefined ,
134- enableSignalsSupport : boolean | undefined
127+ elementReferenceKey : string | undefined
135128) : any => {
136129 /**
137130 * Wraps the injector with a custom injector that
@@ -185,37 +178,28 @@ export const attachView = (
185178 ) ;
186179 }
187180
181+ const { modal, popover, ...otherParams } = params ;
188182 /**
189- * Angular 14.1 added support for setInput
190- * so we need to fall back to Object.assign
191- * for Angular 14.0.
183+ * Any key/value pairs set in componentProps
184+ * must be set as inputs on the component instance.
192185 */
193- if ( enableSignalsSupport === true && componentRef . setInput !== undefined ) {
194- const { modal, popover, ...otherParams } = params ;
195- /**
196- * Any key/value pairs set in componentProps
197- * must be set as inputs on the component instance.
198- */
199- for ( const key in otherParams ) {
200- componentRef . setInput ( key , otherParams [ key ] ) ;
201- }
186+ for ( const key in otherParams ) {
187+ componentRef . setInput ( key , otherParams [ key ] ) ;
188+ }
202189
203- /**
204- * Using setInput will cause an error when
205- * setting modal/popover on a component that
206- * does not define them as an input. For backwards
207- * compatibility purposes we fall back to using
208- * Object.assign for these properties.
209- */
210- if ( modal !== undefined ) {
211- Object . assign ( instance , { modal } ) ;
212- }
190+ /**
191+ * Using setInput will cause an error when
192+ * setting modal/popover on a component that
193+ * does not define them as an input. For backwards
194+ * compatibility purposes we fall back to using
195+ * Object.assign for these properties.
196+ */
197+ if ( modal !== undefined ) {
198+ Object . assign ( instance , { modal } ) ;
199+ }
213200
214- if ( popover !== undefined ) {
215- Object . assign ( instance , { popover } ) ;
216- }
217- } else {
218- Object . assign ( instance , params ) ;
201+ if ( popover !== undefined ) {
202+ Object . assign ( instance , { popover } ) ;
219203 }
220204 }
221205 if ( cssClasses ) {
0 commit comments