Skip to content

Instantly share code, notes, and snippets.

@Madhust
Last active June 6, 2022 15:55
Show Gist options
  • Save Madhust/49f3ce741c151470f80ec790d2aa152c to your computer and use it in GitHub Desktop.
Save Madhust/49f3ce741c151470f80ec790d2aa152c to your computer and use it in GitHub Desktop.
Stateless standalone component
@Component({
selector: 'app-view',
standalone: true,
imports: [CommonModule],
templateUrl: './view.component.html',
styleUrls: ['./view.component.scss']
})
export class ViewComponent implements OnInit {
@Input()
title = 'stateless-stand-alone-experiment';
@Output()
titleChanged = new EventEmitter()
increment() {
this.titleChanged.emit('Title Changed');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment