@@ -94,16 +94,16 @@ export class CompileTemplateMetadata {
9494}
9595
9696export class CompileDirectiveMetadata {
97- static create ( { type, isComponent, dynamicLoadable, selector, exportAs, changeDetection,
98- properties , events , host, lifecycleHooks, template} : {
97+ static create ( { type, isComponent, dynamicLoadable, selector, exportAs, changeDetection, inputs ,
98+ outputs , host, lifecycleHooks, template} : {
9999 type ?: CompileTypeMetadata ,
100100 isComponent ?: boolean ,
101101 dynamicLoadable ?: boolean ,
102102 selector ?: string ,
103103 exportAs ?: string ,
104104 changeDetection ?: ChangeDetectionStrategy ,
105- properties ?: string [ ] ,
106- events ?: string [ ] ,
105+ inputs ?: string [ ] ,
106+ outputs ?: string [ ] ,
107107 host ?: StringMap < string , string > ,
108108 lifecycleHooks ?: LifecycleHooks [ ] ,
109109 template ?: CompileTemplateMetadata
@@ -123,22 +123,22 @@ export class CompileDirectiveMetadata {
123123 }
124124 } ) ;
125125 }
126- var propsMap = { } ;
127- if ( isPresent ( properties ) ) {
128- properties . forEach ( ( bindConfig : string ) => {
126+ var inputsMap = { } ;
127+ if ( isPresent ( inputs ) ) {
128+ inputs . forEach ( ( bindConfig : string ) => {
129129 // canonical syntax: `dirProp: elProp`
130130 // if there is no `:`, use dirProp = elProp
131131 var parts = splitAtColon ( bindConfig , [ bindConfig , bindConfig ] ) ;
132- propsMap [ parts [ 0 ] ] = parts [ 1 ] ;
132+ inputsMap [ parts [ 0 ] ] = parts [ 1 ] ;
133133 } ) ;
134134 }
135- var eventsMap = { } ;
136- if ( isPresent ( events ) ) {
137- events . forEach ( ( bindConfig : string ) => {
135+ var outputsMap = { } ;
136+ if ( isPresent ( outputs ) ) {
137+ outputs . forEach ( ( bindConfig : string ) => {
138138 // canonical syntax: `dirProp: elProp`
139139 // if there is no `:`, use dirProp = elProp
140140 var parts = splitAtColon ( bindConfig , [ bindConfig , bindConfig ] ) ;
141- eventsMap [ parts [ 0 ] ] = parts [ 1 ] ;
141+ outputsMap [ parts [ 0 ] ] = parts [ 1 ] ;
142142 } ) ;
143143 }
144144
@@ -149,8 +149,8 @@ export class CompileDirectiveMetadata {
149149 selector : selector ,
150150 exportAs : exportAs ,
151151 changeDetection : changeDetection ,
152- properties : propsMap ,
153- events : eventsMap ,
152+ inputs : inputsMap ,
153+ outputs : outputsMap ,
154154 hostListeners : hostListeners ,
155155 hostProperties : hostProperties ,
156156 hostAttributes : hostAttributes ,
@@ -164,23 +164,23 @@ export class CompileDirectiveMetadata {
164164 selector : string ;
165165 exportAs : string ;
166166 changeDetection : ChangeDetectionStrategy ;
167- properties : StringMap < string , string > ;
168- events : StringMap < string , string > ;
167+ inputs : StringMap < string , string > ;
168+ outputs : StringMap < string , string > ;
169169 hostListeners : StringMap < string , string > ;
170170 hostProperties : StringMap < string , string > ;
171171 hostAttributes : StringMap < string , string > ;
172172 lifecycleHooks : LifecycleHooks [ ] ;
173173 template : CompileTemplateMetadata ;
174- constructor ( { type, isComponent, dynamicLoadable, selector, exportAs, changeDetection, properties ,
175- events , hostListeners, hostProperties, hostAttributes, lifecycleHooks, template} : {
174+ constructor ( { type, isComponent, dynamicLoadable, selector, exportAs, changeDetection, inputs ,
175+ outputs , hostListeners, hostProperties, hostAttributes, lifecycleHooks, template} : {
176176 type ?: CompileTypeMetadata ,
177177 isComponent ?: boolean ,
178178 dynamicLoadable ?: boolean ,
179179 selector ?: string ,
180180 exportAs ?: string ,
181181 changeDetection ?: ChangeDetectionStrategy ,
182- properties ?: StringMap < string , string > ,
183- events ?: StringMap < string , string > ,
182+ inputs ?: StringMap < string , string > ,
183+ outputs ?: StringMap < string , string > ,
184184 hostListeners ?: StringMap < string , string > ,
185185 hostProperties ?: StringMap < string , string > ,
186186 hostAttributes ?: StringMap < string , string > ,
@@ -193,8 +193,8 @@ export class CompileDirectiveMetadata {
193193 this . selector = selector ;
194194 this . exportAs = exportAs ;
195195 this . changeDetection = changeDetection ;
196- this . properties = properties ;
197- this . events = events ;
196+ this . inputs = inputs ;
197+ this . outputs = outputs ;
198198 this . hostListeners = hostListeners ;
199199 this . hostProperties = hostProperties ;
200200 this . hostAttributes = hostAttributes ;
@@ -212,8 +212,8 @@ export class CompileDirectiveMetadata {
212212 changeDetection : isPresent ( data [ 'changeDetection' ] ) ?
213213 CHANGE_DECTION_STRATEGY_VALUES [ data [ 'changeDetection' ] ] :
214214 data [ 'changeDetection' ] ,
215- properties : data [ 'properties ' ] ,
216- events : data [ 'events ' ] ,
215+ inputs : data [ 'inputs ' ] ,
216+ outputs : data [ 'outputs ' ] ,
217217 hostListeners : data [ 'hostListeners' ] ,
218218 hostProperties : data [ 'hostProperties' ] ,
219219 hostAttributes : data [ 'hostAttributes' ] ,
@@ -233,8 +233,8 @@ export class CompileDirectiveMetadata {
233233 'type' : isPresent ( this . type ) ? this . type . toJson ( ) : this . type ,
234234 'changeDetection' : isPresent ( this . changeDetection ) ? serializeEnum ( this . changeDetection ) :
235235 this . changeDetection ,
236- 'properties ' : this . properties ,
237- 'events ' : this . events ,
236+ 'inputs ' : this . inputs ,
237+ 'outputs ' : this . outputs ,
238238 'hostListeners' : this . hostListeners ,
239239 'hostProperties' : this . hostProperties ,
240240 'hostAttributes' : this . hostAttributes ,
@@ -253,8 +253,8 @@ export function createHostComponentMeta(componentType: CompileTypeMetadata,
253253 template : new CompileTemplateMetadata (
254254 { template : template , templateUrl : '' , styles : [ ] , styleUrls : [ ] , ngContentSelectors : [ ] } ) ,
255255 changeDetection : ChangeDetectionStrategy . Default ,
256- properties : [ ] ,
257- events : [ ] ,
256+ inputs : [ ] ,
257+ outputs : [ ] ,
258258 host : { } ,
259259 lifecycleHooks : [ ] ,
260260 isComponent : true ,
0 commit comments