任务列表之菜单

一,任务列表之菜单

ng g m task
ng g c task/task-home --spec=false
ng g c task/task-list --spec=false
ng g c task/task-item --spec=false
ng g c task/task-header --spec=false
Uncaught Error: Template parse errors:
'mat-lsit' is not a known element:
1. If 'mat-lsit' is an Angular component, then verify that it is part of this module.

list拼错了

Can't bind to 'matMenuTriggerFor' since it isn't a known property of 'div'. ("
  </div>

  <div mat-icon-button [ERROR ->][matMenuTriggerFor]="menu">
    <mat-icon>keyboard_arrow_down</mat-icon>

"): ng:///TaskModule/TaskHeaderComponent.html@12:23
There is no directive with "exportAs" set to "matMenu" ("
---》没在shared里加MatMenuModule

几种和HTML对应组件非常像的Material组件:
复选框:md-checkbox
单选框:md-radio
下拉框:md-select

2.13 任务列表之任务组件

2.14 任务列表之新任务对话框
Datepicker:input和md-datepicker

ng g c task/new-task --spec=false


Uncaught Error: Template parse errors:
Can't bind to 'matDatepickerToggle' since it isn't a known property of 'button'. ("
        >
        <button type="button" matSuffix 
        [ERROR ->][matDatepickerToggle]="dueDatepicker">
        </button>
      </mat-input-container>
"): ng:///TaskModule/NewTaskComponent.html@20:8
Can't bind to 'matDatepickerToggle' since it isn't a known property of 'button'. ("
          >
          <button type="button" matSuffix 
          [ERROR ->][matDatepickerToggle]="reminderDatepicker">
          </button>
        </mat-input-container>
"): ng:///TaskModule/NewTaskComponent.html@35:10

----->
 <!-- <button type="button" matSuffix 
          [mat-datepicker-toggle]="reminderDatepicker">
          </button> -->
          <mat-datepicker-toggle
          matSuffix [for] = "reminderDatepicker">

2.15 移动内容对话框

点击移动本列表所有内容:
ERROR TypeError: _co.launchCopyTaskDislog is not a function
--->拼错了

2.16完成主框架 上
点击任务的时候弹出修改,但是点击任务前面的小框框的时候也会弹出,这样不好,
要用stopPropagation()阻止事件向上传递

删除按钮不放在project或者task里,因为用到的地方会比较多

ng g c shared/confirm-dialog --inline-template --inline-style --spec=false
inline-template是指不单独创建html模板
inline-style是指不单独创建scss


 No component factory found for ConfirmDialogComponent. Did you add it to @NgModule.entryComponents?

2.16完成主框架 下
修改列表名称和新建列表点了没用:
task-header.component.html里(click)=”onEditListClick()”的地方写错了,应该写在button上面的
点击“关闭”后页面刷新:分析:应该是按钮的样式不对:

<button type="buton" mat-raised-close mat-button>关闭</button>
mat-raised-close改为mat-dialog-close

教程里还提示没有hammerJs,安装方法:cnpm install --save hammerjs
在core.module.ts里import 'hammerjs';

新增和修改,推荐复用dialog
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值