diff --git a/lib/examples/angular/app.component.html b/lib/examples/angular/app.component.html new file mode 100644 index 0000000..64e187a --- /dev/null +++ b/lib/examples/angular/app.component.html @@ -0,0 +1,33 @@ +// app.component.html +
{{ userInput }}
+ +{{ mesage }}
+ + +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'app-root', + templateUrl: './app.component.html', + styleUrls: ['./app.component.css'] +}) +export class AppComponent implements OnInit { + userInput: string = ''; // XSS example input + message: string = 'Hello, user!'; // Typo in the variable name + + // Performance issue: Unoptimized method + loadData() { + for (let i = 0; i < 1000000; i++) { + console.log('Loading data...'); // This will cause a performance issue due to excessive logging + } + } + + ngOnInit() { + // Intentionally empty for this example + } +}