0

I'm trying to create a simple component on stackblitz. I have generated a new component and then tried to add the line standalone: true:

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-standalone',
  templateUrl: './standalone.component.html',
  styleUrls: ['./standalone.component.css'],
  standalone: true,
})
export class StandaloneComponent implements OnInit {

  constructor() { }

  ngOnInit() {
  }

}

But I get the error: Object literal may only specify known properties, and 'standalone' does not exist in type 'Component'.(2345)

What am I doing wrong?

JimmyTheCode
  • 3,783
  • 7
  • 29
  • 71

0 Answers0