I would llike tot test the performance of three frontend frameworks. AngularJS Angular 2 and EmberJS.
Currently I am trying to load 1000 objects from a number array to test the performance. I have encountered dificulties with loading the items from the array into a html list when loading the page.
app.component.ts:
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'my-app',
template: `
<input type="button" value="load items">
<ul>
<li (load)="ngOnInit() "*ngFor="let number of numberArray">
<span class="badge">{{number}}</span>
<li>
</ul>`
})
export class AppComponent implements OnInit {
ngOnInit(): void {
var numberArray: Array<number> = [];
for (var i = 0; i < 1000; i++) {
numberArray.push(i);
}
console.log(numberArray);
}
};
To clarify my problem: I want to load the 1000 object from my array when I load the page I look forward to your answer