title: error TS2339: Property 'addForm' does not exist on type 'PostsComponent'
body: <p>This is the error messenge:</p>
  
  <pre><code>ERROR in src/app/components/posts/posts.component.html:6:58 - error TS2339: Property 'addForm' does not exist on type 'PostsComponent'.
  &lt;form #postForm="ngForm" (ngSubmit)="addForm(postForm)"&gt; 
  
  src/app/components/posts/posts.component.ts:7:16
  templateUrl: './posts.component.html',
  Error occurs in the template of component PostsComponent.
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/BDk3M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BDk3M.png" alt="enter image description here"></a></p>
  
  <p>Remarkably, the error only occurs when i write the following line in the <strong>posts.component.html</strong> file:</p>
  
  <pre><code>&lt;form #postForm="ngForm" (ngSubmit)="addForm(postForm)"&gt;
  </code></pre>
  
  <p>This is what I have in <strong>post/component.ts</strong>:</p>
  
  <pre><code>import { Component, OnInit } from '@angular/core';
  
  import { PostService } from '../../services/post.service';
  
  @Component({
    selector: 'app-posts',
    templateUrl: './posts.component.html',
    styleUrls: ['./posts.component.css'],  
    providers: [PostService],
  }) 
  export class PostsComponent implements OnInit {
  
    constructor(private postService: PostService) { }
  
    ngOnInit(): void {
    }
  
  }
  </code></pre>
  
  <p>But I suppose the error is actually in <strong>post.service.ts</strong>, where the following line appears:</p>
  
  <pre><code>import { PostsComponent} from '../components/posts/posts.component'
  </code></pre>
  
  <p>In the introductory video I´m learning with (<a href="https://www.youtube.com/watch?v=ccBtSAMFjto" rel="nofollow noreferrer">https://www.youtube.com/watch?v=ccBtSAMFjto</a>) at min 29:45 the line above appears written on line 4 <strong>in an unexplained way</strong>. Indeed, the last time that area of the screen is displayed is at min 24 and the line was absent.</p>
  
  <p>When I write this line in my code it appears shaded as if it were missing a relationship, and the same doesn't happen in the video code. I guess this is related to my error as it has to do with "PostsComponent".</p>
  
  <p>In min 17 of the video he has the same problem and seems to solve it by adding the following line in ** app.module.ts **:</p>
  
  <pre><code>import { FormsModule } from '@angular/forms';
  </code></pre>
  
  <p>I find similar questions asked before, but can't figure out what the common cause is for discovering my mistake.</p>