Angular 2 Tutorial - 6 - Creating Your First Component

preview_player
Показать описание

📱 Follow Codevolution

Creating components in Angular 2

Angular 2 | Angular 2 Components | Angular 2 Tutorial | Angular 2 Tutorial for Beginners
Рекомендации по теме
Комментарии
Автор

which version of angular are you using, I dont have the same folder structure, I have beta 28.3

kartikpant
Автор

I get the following error after I created this component:
Unexpected directive value 'undefined' on the View of component 'AppComponent'

Is it also becaue of 2.0 release and I should refer to tutorial # 16 ?

syedhasana
Автор

I generated the tutorials component using the cli tool and it works, however the app.components.ts does not contain any reference to the tutorials module.
It seems that many things have been changed massively since this tutorial. Is there maybe an updated version?

klaasvg
Автор

Please give solution for this error:
Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false).

saikiranaakula
Автор

it show me error in directive

Argument of type '{ selector: string; template: string; directives: typeof TutorialsComponent[]; }' is not assignable to parameter of type 'Component'.
Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.

rajthakur
Автор

Could you show how you setup visual studio code. I do not get intellisense, help(doc) in my visual studio code as you are getting

gauravdighe
Автор

Hi, help me for this problem

When you are creating New Component in VScode as tutorials.component.ts it was automatic generates remaining files like tutorials.component.html and tutorials.component.cs but when I am adding tutorials.component.ts it was not generating is there any extinction to install for that automatic generates files

I really thank you for your help.

sivad
Автор

can we create 2 components in one .ts file;

amruthachenna
Автор

Hi! My Angular is 2.1.1 and I followed the steps creating my first component, but my page is not visible and I get an error:

"
[0] app/app.component.ts(8, 3): error TS2345: Argument of type '{ selector: string; template: string; directives: typeof
tutorials[]; }' is not assignable to parameter of type 'Component'.
[0] Object literal may only specify known properties, and 'directives' does not exist in type 'Component'.
"

Was there something I missed?

chenxuanwang
Автор

hello sir, i couldn't get that import { TutorialsComponent } in app.component so, please can you help out with that ????
if i put the import statement it goes with grey colour and not working with that

anithah
Автор

hello...please i'm new to angular and after following this can't get the tutorials component to display and there's also this error that says
"Argument of type '{ selector: string; template: string; derivatives: undefined[]; }' is not assignable to parameter of type 'Component'.
Object literal may only specify known properties, and 'derivatives' does not exist in type 'Component'."

Please...any help as i'm having a fulfilling time with frustration here.

busolaomosipe
Автор

Excellent tutorials but where is the app.module.ts

johanpotgieter
Автор

Hi Codevolution

I got error while adding the line does not exist in 'component'

hasithaamruthavakkula
Автор

This tutorials is not working
After following the same steps it is not replacing "Hello World" to "my tutorial" text.

charlespp
Автор

directives in @Component has been removed in 2.0.0-rc.5 which was long ago. You now declare components in an NgModule.

Please close this issue since it's a request support and is not suitable for the issue tracker.

smithdragon
Автор

isn't easier ng generate component tutorials

ZnSstr
Автор

Please give solution for this error:
Couldn't open browser (if you are using BrowserSync in a headless environment, you might want to set the open option to false)

saikiranaakula
visit shbcf.ru