我有一个带有按钮的Angular2应用程序,可以为我的贷款添加另一笔贷款.我的*ngFor也非常简单:
<div *ngFor="let loan of myLoans">
<label>{{loan.name}}</label>
<input type="text" name="loan.name" [(ngModel)]="loan.amount">
</div>
Run Code Online (Sandbox Code Playgroud)
myLoans是一个带有name和amount参数的Loan对象数组.我的按钮也很简单.
<button id="addLoan" type="button" (click)="addLoan()">Legg til lån</button>
Run Code Online (Sandbox Code Playgroud)
addLoan()函数:
addLoan(): void{
var newLoan = new Loan();
this.myLoans.push(newLoan);
}
Run Code Online (Sandbox Code Playgroud)
我的问题是,当我在列表中添加新贷款时,我在其他贷款的输入字段中的任何值都会回到0或我在贷款对象的构造函数中设置的任何值.
加载应用程序会显示此图片
键入数字时,ngModel正在工作
按下"Leggtillån"按钮后,将重置第一个输入的值
如果我尝试输入另一个数字,ngModel仍在为第一个输入工作
任何人都知道这里发生了什么?
我们将所有管道都签入了代码,但是如果我们在这些管道中更改了 PR,那么 PR 构建策略将与 MASTER 中的 YAML 文件一起运行,而不是我们想要签入 master 的文件。这基本上是一个僵局。
假设您要删除使所有 PR 失败的验证,因此您创建了一个 PR,但无法合并它,导致构建策略失败:P
PS:我知道我可以删除策略,完成合并,然后手动添加策略,但这并不是一个好的解决方案。
尝试从BitBucket或Github克隆存储库时出现此错误.我试过重新启动计算机,重新安装Sourcetree,但没有运气.还有其他提示吗?我的电脑上只有一个cygwin1.dll文件.
0 [main] sh (8532) C:\Users\myUser\AppData\Local\Atlassian\SourceTree\git_local\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1180400/0x1120400.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
angular ×1
azure ×1
azure-devops ×1
data-binding ×1
git ×1
ng-modal ×1
ngfor ×1
sourcetree ×1
typescript ×1