Home / Companies / Humanitec / Blog / Post Details
Content Deep Dive

Update and Insert Auto-Generated Code To Existing Typescript, HTML and Json Files With Angular Schematics PT.2

Blog post from Humanitec

Post Details
Company
Date Published
Author
Aziz Haddad
Word Count
672
Language
English
Hacker News Points
-
Summary

Angular schematics provide a powerful way to modify and add auto-generated code to existing files in TypeScript, HTML, and JSON formats by leveraging the power of Angular's internal developer platform capabilities. By utilizing Angular's utility functions and tools such as cheerio for parsing HTML elements, developers can create custom rules to update these files efficiently. The process involves creating a new rule to generate code into an existing HTML file using an HTML parser like cheerio, and updating JSON files by leveraging Angular's built-in utility functions. With schematics, developers can automate repetitive tasks and streamline their development workflow, ultimately improving productivity and reducing errors.