In my current role, I’m in a situation with numerous developers working on a single, large AngularJS project, with new API’s popping up every day, I want each developer to be able to crank out a new service to consume all the new API’s with little thought or effort. I decided to write a small, extensible RESTful constructor that does just that.
In part 8 of this series we will make a content service to replace our existing vanilla $http requests in our route resolves, and then we’ll make an additional service to go fetch the relevant media associated with a featured image. Then we’ll conditionally display the featured image below our post title if one exists.
I like Swiip’s generator-gulp-angular for Yeoman. It’s pretty complete, if not a little daunting at times. It does a lot. It does a lot automagically. So when I set out to add a SASS Bootswatch theme I was a little unsure of what to expect.
When you serve your application that we’ve been making over the past 6 instalments, you’ll notice that the title and meta description tags are empty. We could set them to a static default, but they’d be the same on every page. This wouldn’t be terribly useful to your visitors, nor would it help when it came to SEO (search engine optimization) and how we appear on the SERP’s (search engine results page) would be less than desirable.
In part 7 of this series we will make a meta service that will set the title and meta description tags dynamically, determined by the title on content of the page that is currently being served.
In part 6 I will show you how to reuse that sitemap data to create a dynamic footer which links to all the page that don’t render in the navigation by default.