Skip to content

Instantly share code, notes, and snippets.

View Sajon5271's full-sized avatar
😁

Sirajis Salekin Sajon Sajon5271

😁
  • 11:23 (UTC +06:00)
View GitHub Profile
@JanMalch
JanMalch / Angular - custom structural directives.md
Last active June 9, 2024 16:30
Writing your own structural directives with context variables

Writing your own structural directives with context variables

Complete code in math.directive.ts

After reading this you will be able to create a structural directive with inputs and context variables and use it like this:

<div *math="10; exponent: 3; let input; 
            let exponent = exponent; let r = root;
 let p = power; let ctrl = controller"&gt;