Using Gulp to inject scripts and styles tags directly into your HTML
· 11 min read
This is very probably the dullest title for a blog post I've ever come up with. Read on though folks - it's definitely going to pick up...
The Node.js runtime.
View All TagsThis is very probably the dullest title for a blog post I've ever come up with. Read on though folks - it's definitely going to pick up...
Every now and then something bites you unexpectedly. After a certain amount of pain, the answer comes to you and you know you want to save others from falling into the same deathtrap.
There I was minding my own business and having a play with a Gulp plugin called gulp-angular-templatecache. If you're not aware of it, it "Concatenates and registers AngularJS templates in the $templateCache". I was planning to use it so that all the views in an Angular app of mine were loaded up-front rather than on demand. (It's a first step in making an "offline-first" version of that particular app.)