Skip to content

Instantly share code, notes, and snippets.

@sidmohanty11
sidmohanty11 / dynamic-html-tags-generation-angular.ts
Created June 22, 2024 09:40
Dynamic HTML tags generation with Angular v16 and above
import {Component, Input, ViewChild, ElementRef, ViewContainerRef, TemplateRef, Renderer2} from '@angular/core';
import {bootstrapApplication} from '@angular/platform-browser';
import { CommonModule } from '@angular/common';
@Component({
selector: 'dynamic-div, DynamicDiv',
template: ` <div #v><ng-content></ng-content></div>`,
standalone: true,
})
export class DynamicDiv {
@sidmohanty11
sidmohanty11 / index.html
Created June 22, 2021 15:42
profile card
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>profile card</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>