/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ // compiler benchmark in AngularJS 1.x import {getIntParameter, bindAction} from '@angular/testing/src/benchmark_util'; declare var angular: any; export function main() { const ngEl = document.createElement('div'); angular.bootstrap(ngEl, ['app']); } function loadTemplate(templateId, repeatCount) { const template = document.querySelectorAll(`#${templateId}`)[0]; const content = (template).innerHTML; let result = ''; for (let i = 0; i < repeatCount; i++) { result += content; } // replace [] binding syntax result = result.replace(/[\[\]]/g, ''); // Use a DIV as container as Angular 1.3 does not know