小编Abh*_*ade的帖子

可选参数?

Can Go有可选参数吗?或者我可以只定义两个具有相同名称和不同数量的参数的函数?

overloading go

411
推荐指数
11
解决办法
21万
查看次数

当我尝试迭代ngFor循环时,Angular 2+ attr.disabled不适用于div

我正在预约预约应用程序,我正在显示使用*ngFor循环约会的时间段.

HTML

<div *ngFor="let item of allTimeSlots">
    <div class="col-sm-3">
        <div class="choice" data-toggle="wizard-slot" [attr.disabled]="item.status" (click)="slotSelected($event)">
            <input type="radio" name="slot" value="{{item.timeSlot}}">
            <span class="icon">{{item.timeSlot}}</span> {{item.status}}
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

打字稿

for (var index = 0; index < this.totalMinutes; index += 15, i++) {
  this.allTimeSlots[i] = new allTimeSlots("", false);

  this.allTimeSlots[i].timeSlot = (hour <= 12 ? hour : hour - 12) + ":" + (minute <= 9 ? ("0" + minute) : minute) + " " + ampm;
  this.bookedTimeSlots.forEach(element => {
    if (this.allTimeSlots[i].timeSlot == element) …
Run Code Online (Sandbox Code Playgroud)

typescript ngfor angular

9
推荐指数
3
解决办法
4万
查看次数

标签 统计

angular ×1

go ×1

ngfor ×1

overloading ×1

typescript ×1