Property '…' has no initializer and is not definitely assigned in the constructor

in my Angular app i have a component:

import { MakeService } from './../../services/make.service';
import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-vehicle-form',
  templateUrl: './vehicle-form.component.html',
  styleUrls: ['./vehicle-form.component.css']
})
export class VehicleFormComponent implements OnInit {
  makes: any[];
  vehicle = {};

  constructor(private makeService: MakeService) { }

  ngOnInit() {
    this.makeService.getMakes().subscribe(makes => { this.makes = makes
      console.log("MAKES", this.makes);
    });
  }

  onMakeChange(){
    console.log("VEHICLE", this.vehicle);
  }
}

but in the “makes” property I have a mistake.
I dont know what to do with it…

mistake

172 thoughts on “Property '…' has no initializer and is not definitely assigned in the constructor”

  1. I just couldn’t leave your website prior to suggesting that I really enjoyed the standard info a person provide in your visitors? Is gonna be again ceaselessly to inspect new posts.

    Reply
  2. I just could not go away your web site before suggesting that I extremely loved the usual information an individual supply in your guests? Is gonna be back regularly in order to investigate cross-check new posts.

    Reply
  3. An impressive share! I’ve just forwarded this onto a friend who had been doing a little homework on this.
    And he in fact ordered me dinner due to the fact that I found it for
    him… lol. So let me reword this…. Thanks for the meal!!
    But yeah, thanks for spending the time to discuss this issue here on your internet site.

    Reply
  4. Its such as you read my mind! You appear to grasp so
    much approximately this, such as you wrote the guide in it or something.
    I think that you simply can do with some p.c. to force the message house a bit, however instead of that, that is fantastic blog.
    A great read. I will certainly be back.

    Reply
  5. Hi! This is my first comment here so I just wanted to give a quick
    shout out and tell you I genuinely enjoy reading through your
    blog posts. Can you recommend any other blogs/websites/forums
    that cover the same topics? Thanks!

    Reply
  6. I do consider all the ideas you have introduced on your post.
    They’re very convincing and will certainly work.
    Still, the posts are too short for newbies. May just you please prolong them a bit from next time?
    Thank you for the post.

    Reply
  7. Hi there! This is my first visit to your blog! We are a team of volunteers and starting a new project in a community in the same niche.
    Your blog provided us useful information to work on. You have done a outstanding job!

    Reply
  8. Hey there! I realize this is somewhat off-topic however I had to ask.
    Does building a well-established website such as yours require a large amount of work?
    I am completely new to operating a blog however I do write in my journal everyday.
    I’d like to start a blog so I will be able to share my
    personal experience and feelings online. Please let me know if you
    have any kind of recommendations or tips for new aspiring
    bloggers. Appreciate it!

    Reply
  9. Hiya! Quick question that’s completely off topic.
    Do you know how to make your site mobile friendly? My site looks weird when viewing from
    my iphone4. I’m trying to find a theme or plugin that might be
    able to resolve this issue. If you have any recommendations, please share.
    Appreciate it!

    Reply
  10. It’s actually a nice and helpful piece of information. I’m happy that you simply shared this helpful information with us. Please keep us up to date like this. Thank you for sharing.

    Reply
  11. Awesome blog! Do you have any tips and hints for aspiring
    writers? I’m hoping to start my own site soon but I’m a little
    lost on everything. Would you propose starting
    with a free platform like WordPress or go for a paid option? There
    are so many choices out there that I’m totally confused ..

    Any tips? Thanks a lot! quest bars http://bit.ly/3jZgEA2 quest
    bars

    Reply
  12. What i do not realize is in truth how you are not actually a lot more well-liked than you may be
    now. You’re so intelligent. You realize thus considerably when it comes to this subject, produced me individually believe it from so
    many numerous angles. Its like men and women are not interested until it
    is one thing to accomplish with Woman gaga! Your own stuffs excellent.
    At all times maintain it up! ps4 https://tinyurl.com/45xtc52b ps4 games

    Reply

Leave a Comment