In the rest of this article, I’ll walk you through how to use Pug in your Angular component templates. With Pug, your templates become simpler to write and read and you can extend the functionality of your template as an added bonus. In addition to providing a more streamlined way to write templates, it offers a number of valuable features that go beyond just template writing like mixins that facilitate code reusability, enable embedding of JavaScript code, provide iterators, conditionals, and so on.Īlthough HTML is universally used by many and works adequately in templates, it is not DRY and can get pretty difficult to read, write, and maintain especially with larger component templates. In this case, Pug is used to write templates that are compiled into functions that take in data and render HTML documents. This means it’s a tool that generates documents from templates that integrate some specified data. Pug (formerly known as Jade) is a template engine. Read more about a service that allows us to serve, transform and manage images in the cloud. A built-in Angular feature called BreakPoint Observer gives us a powerful interface for dealing with responsive images.
0 Comments
Leave a Reply. |