logo
  • 教程列表
  • SO官方文檔
  • Angular 還原
    • 基本
    • 獲取當前狀態
    • 改變狀態
    • 新增 redux chrome 工具
  1. StackOverflow 文件
  2. Angular 2 教程
  3. Angular 還原
  4. 獲取當前狀態

獲取當前狀態

Created: November-22, 2018

import * as Redux from 'redux';
import {Inject, Injectable} from '@angular/core';

@Injectable()
export class exampleService {
    constructor(@Inject(AppStore) private store: Redux.Store<AppState>) {}
    getExampleState(){
      console.log(this.store.getState().example);
   }
}
  • 改變狀態
  • 基本

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明