我正在研究一个小的angularjs应用程序.我有一个按钮,我正在使用2个事件,ng-click和onlick.它运作正常,没有问题,但我想确保100%我做得很好,我的做法是对的吗?它是否允许在按钮状态事件中将它们组合在一起?
I am using the traditional ngFor for iterating across an array followed with index, my sample code:
<div *ngFor="let object of Objects; let i = index">
Run Code Online (Sandbox Code Playgroud)
I want to know is it possible to get the last index from the array in i? I know I can find the first or any other by if i === 1, etc, but is there a method to check directly if i is the last one from the array? Thanks.