Skip to content

Instantly share code, notes, and snippets.

@Sourabhhsethii
Created May 22, 2020 04:31
Show Gist options
  • Save Sourabhhsethii/3385be35e0bb93bdde510f2cf8f6d161 to your computer and use it in GitHub Desktop.
Save Sourabhhsethii/3385be35e0bb93bdde510f2cf8f6d161 to your computer and use it in GitHub Desktop.
AppComponent
import { Component, Inject, Output, EventEmitter } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'Angular Series A6 : Stylying';
@Output() update = new EventEmitter();
constructor(
@Inject('sharedservices') public sharedservices){
}
onUpdate(id, text){
this.sharedservices.update(id, text);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment