jacksonakp.blogg.se

Pug template angular
Pug template angular







pug template angular

Because Pug compiles to HTML during build time, we can pass around the actual bindings as strings and use Pug String interpolation to produce the final, Angular conform Markup. The interesting part here is all those Angular related directives. Get started - baby stepsįontAwesome is cool, it takes away much pain, like looking for the right images, integrating those in the build process, creating image-maps to reduce HTTP requests… you see, it’s cool!īut it’s frustrating to write for the 3242th time. If you have not used Pug before, see my other posts on Pug here and hereįasten your seatbelt and prepare for some extra time that you can spend with your friends and family instead of waisting this time with tons of markup code. Besides all the advantages like maintainability, readability or the time you save, it’s also fun to use it!

pug template angular

You could easily build compassable mixins, derived templates and other cool things. Pug offers stunning but simple mechanisms to make you even more productive. To get rid of those duplications, *ngFor may be a solution, but concerning performance on mobile devices, you should avoid using those structural directives for such basic things.Īt this point, Pug enters the stage. However, I found myself repeating almost the same markup multiple times while building different prototypes on Angular. Using those directives is smooth and well known in the Angular Community. When building SPAs using Angular or AngularJS, you use custom HTML markup extensions (aka directives) to instrument Angular how to render your SPA or how the different building blocks of your app should correspond to user interaction. Can you imagine the combination of Angular and Pug (previously known as Jade) is super awesome and timesaving? If not, read the following lines and reconsider!









Pug template angular