angularjs - Angular 2 Error ( 'directives' does not exist in type 'Component' ) -


i beginner in angular 2 , i'm using final angular 2 release version. have strange problem it. databinding.component.ts code:

import { component } '@angular/core';  import {propertybindingcomponent} './property-binding.component'; import {eventbindingcomponent} './event-binding.component';   @component({   selector: 'fa-databinding',   templateurl: 'databinding.component.html',   styleurls: ['databinding.component.css'],   directives: [propertybindingcomponent, eventbindingcomponent] }) 

and peace of app.module.ts code :

import { propertybindingcomponent } './databinding/property-binding.component'; import { eventbindingcomponent } './databinding/event-binding.component';  @ngmodule({   declarations: [     appcomponent,     othercomponent,     anothercomponent,     databindingcomponent,     propertybindingcomponent,     eventbindingcomponent   ] 

this code not work correctly:

error in [default] /home/tornado/work/first-app/src/app/databinding/databinding.component.ts:11:2  argument of type '{ selector: string; template: any; styles: any[]; directives: (typeof propertybindingcomponent | ...' not assignable parameter of type 'component'.   object literal may specify known properties, , 'directives' not exist in type 'component'. 

what should do?!?!

directives removed component. see following: https://stackoverflow.com/a/39410642/5487673


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -