<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: codexknight7</title>
    <description>The latest articles on DEV Community by codexknight7 (@codexknight7).</description>
    <link>https://dev.to/codexknight7</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1095574%2F838dd521-e575-4518-a9ff-78366a204383.jpeg</url>
      <title>DEV Community: codexknight7</title>
      <link>https://dev.to/codexknight7</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/codexknight7"/>
    <language>en</language>
    <item>
      <title>First Angular app problem</title>
      <dc:creator>codexknight7</dc:creator>
      <pubDate>Mon, 05 Jun 2023 02:52:11 +0000</pubDate>
      <link>https://dev.to/codexknight7/first-angular-app-problem-4bc4</link>
      <guid>https://dev.to/codexknight7/first-angular-app-problem-4bc4</guid>
      <description>&lt;p&gt;Hello all.&lt;br&gt;
I am a complete novice to Angular and just started to learn.&lt;br&gt;
So, I begun with First Angular app.&lt;br&gt;
Lesson 1 went well. I could display Hello World.&lt;br&gt;
After that, at lesson 2, there is a big problem.&lt;br&gt;
I am following exactly the steps as they are, but my application does not compile.&lt;br&gt;
It says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Error: src/app/app.module.ts:9:5 - error NG6008: Component AppComponent is standalone, and cannot be declared in an NgModule. Did you mean to import it instead?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here is my app.module.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is home.components.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-home',
  standalone: true,
  imports: [CommonModule,],
  template: `
    &amp;lt;p&amp;gt;
      home works!
    &amp;lt;/p&amp;gt;
  `,
  styleUrls: ['./home.component.css']
})
export class HomeComponent {
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And here app.components.ts&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { Component } from '@angular/core';
import { HomeComponent } from './home/home.component';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css'],
  standalone: true,
  imports: [HomeComponent,],
})
export class AppComponent {
  title = 'homes';
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I tried to download the code provided in tutorial, but it does not work, seems like it is from the Old version of Angular.&lt;/p&gt;

&lt;p&gt;Is it me who made mistake somewhere, or is it the tutorial?&lt;/p&gt;

&lt;p&gt;PS: I have the latest versions of Angular and Node.js installed.&lt;br&gt;
I work with VS COde.&lt;/p&gt;

&lt;p&gt;Thank you&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
