Skip to main content

Posts

Showing posts with the label dry

Reducing and minimizing HTML in Angular components

If you are thinking about converting your site or application to a project that uses JavaScript framework, this post might be helpful. In my earlier web development days, I wrote a personal portfolio website using nothing more but HTML and CSS, and just a little bit of JavaScript. However, my experience and knowledge base grew larger with time, and I realized that things I want to do would be done better if I am using a framework. So, I decided to convert to Angular.   Photo by Gabriel Heinzer on Unsplash   What does Angular do better? Say you have a block of HTML elements that displays your personal projects. It might look something like this: < div class = "projects" > < div class = "item" > < a href = "https://www.missionautomate.com" target = "_blank" > < img src = "img/projects/ProjectMA.jpg" alt = "project one" /> </ a > </ div > ...