@Lucas
The code is given below, I gave the "< .. >" just to show that its a
placeholder.
import { Component } from '@angular/core';
@Component({
selector: 'menu',
template: '<h1>Angular Menu</h1>'
})
export class MenuComponent { }
@Component({
selector: 'my-app',
template: '<h1>My First Angular App</h1><menu></menu>',
directives: []
})
export class AppComponent { }
Thanks,
Balaji Iyengar
On Friday, September 23, 2016 at 7:33:54 PM UTC+5:30, Lucas Lacroix wrote:
> Could you provide the actual code? I worry that you are including the
> angle brackets ("<" and ">") around the class name which would make it a
> cast operation.
>
> On Fri, Sep 23, 2016 at 7:30 AM Balaji Iyengar <[email protected]
> <javascript:>> wrote:
>
>> Hi,
>>
>> I need to include a child component into a parent component. Followed the
>> steps suggested in various online blogs to use something like
>>
>> @Component
>> ({
>> directives: [<Class Name>]
>> })
>>
>> But when I do the above I get the below error, Please help.
>>
>> Using Angular 2, QuickStart Guide steps to create the project in VS2015,
>> Typescript 2.0.3
>>
>> Error: Argument of type '{ selector: string; template: string;
>> directives: undefined[]; }' is not assignable to parameter of type
>> 'Component'.
>> Object literal may only specify known properties, and 'directives' does
>> not exist in type 'Component'.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "AngularJS" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at https://groups.google.com/group/angular.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> Lucas Lacroix
> Computer Scientist
> Advanced Technology Division, MEDITECH <http://ehr.meditech.com/>
> 781-774-2293
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.