angular - Sending string one component to other component in angular2 -
i want send username login component home component ...how can please tell me simple example showing sending string 1 component use angular2 cli , vs code editor
use @input
import { component, input } '@angular/core';
@component({ selector:'counter', inputs: ['number'] }) export class countercomponent {
@input() count: number = 0;
}
@component({ selector: 'counter-sibling', template: '' }) export class countersibling{
@output() count: number = 0;
} usage in counter-sibling:
Comments
Post a Comment