angular - In angular2 need to send data from one component to another component -
after entering mobile no login component verify otp otp component need mobile no , country code user entered pass parameters api in otp service. need pass data login otp component how perform in angular2 ?
sandip right. example define following shared variable inside 'shareddataservice':
import { injectable } '@angular/core'; @injectable() export class shareddataservice{ hasuserloggedin: boolean; }
then use service inside 'appcomponent':
@component({ providers: [ shareddataservice ] })
the variable can used across whole app.
Comments
Post a Comment