From 5f1487e33aa3e04454c4643581018263aacf22b3 Mon Sep 17 00:00:00 2001 From: "Gooroo.dev" Date: Wed, 29 May 2024 12:55:55 +0000 Subject: [PATCH 1/2] Angular example --- lib/examples/angular/app.component.html | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 lib/examples/angular/app.component.html diff --git a/lib/examples/angular/app.component.html b/lib/examples/angular/app.component.html new file mode 100644 index 0000000..896f5f7 --- /dev/null +++ b/lib/examples/angular/app.component.html @@ -0,0 +1,33 @@ +// app.component.html +
+

Welcome to Our Website

+

+ +
+ + +

{{ 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 + } +} From d7955001b39dad0a2bf5f1b7b4cc77e80a78f542 Mon Sep 17 00:00:00 2001 From: "Gooroo.dev" Date: Thu, 30 May 2024 13:16:39 +0200 Subject: [PATCH 2/2] Fix CSS --- lib/examples/angular/app.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/examples/angular/app.component.html b/lib/examples/angular/app.component.html index 896f5f7..64e187a 100644 --- a/lib/examples/angular/app.component.html +++ b/lib/examples/angular/app.component.html @@ -1,7 +1,7 @@ // app.component.html

Welcome to Our Website

-

+

{{ userInput }}