Angular 标识符';长度';没有定义';空';不包含此类成员ng

Angular 标识符';长度';没有定义';空';不包含此类成员ng,angular,Angular,我正在尝试创建一个简单的TODO应用程序,我正在使用ng2 redux进行状态管理,我正在尝试访问视图中的TODO数组长度 虽然应用程序编译成功,但我的代码中仍显示一个错误 错误: 当前代码: 待办事项仪表板.component.ts import { Component, OnInit } from '@angular/core'; import { NgRedux, select } from 'ng2-redux'; import { IAppState } from 'src/stor

我正在尝试创建一个简单的TODO应用程序,我正在使用
ng2 redux
进行状态管理,我正在尝试访问视图中的
TODO
数组长度 虽然应用程序编译成功,但我的代码中仍显示一个错误

错误:

当前代码:

待办事项仪表板.component.ts

import { Component, OnInit } from '@angular/core';
import { NgRedux, select } from 'ng2-redux';
import { IAppState } from 'src/store';
@Component({
  selector: 'app-todo-dashboard',
  templateUrl: './todo-dashboard.component.html',
  styleUrls: ['./todo-dashboard.component.css'],
})
export class TodoDashboardComponent {
  @select() todos;
  constructor(private ngRedux: NgRedux<IAppState>) {}
}
export interface IAppState {
  todos: any[];
  lastUpdated: Date;
}

export const INITIAL_STATE: IAppState = {
  todos: [],
  lastUpdated: null,
};

export const rootReducer = (state: IAppState, action): IAppState => {}
我曾尝试在
tsconfig.json
文件中添加
“strictNullChecks”:false
,但运气不佳,因此如果有人能帮我禁用错误或克服错误,我将不胜感激:)

export interface IAppState {
  todos: any[];
  lastUpdated: Date;
}

export const INITIAL_STATE: IAppState = {
  todos: [],
  lastUpdated: null,
};

export const rootReducer = (state: IAppState, action): IAppState => {}