How to build a full-page website in Angular

12. Add a custom directive

And now for the fun part! Our website is mostly functional except for the fact that our background image does not stretch to fit the full real estate of the browser. We are going to tackle this problem by creating a custom directive that will resize our image to make it full page height and width.

Thank you for reading 5 articles this month* Join now for unlimited access

Enjoy your first month for just £1 / $1 / €1

*Read 5 free articles per month without a subscription

Join now for unlimited access

Try first month for just £1 / $1 / €1

TOPICS
Read more
A desktop with a colourful portfolio on screen
How to create an online portfolio: Steps to curating your own corner of the web
Three logos of the best website builders for photographers.
The best website builder for photographers: build an online home for your images
Best website builder for artists: Wix/Shopify/Squarespace
The best website builder for artists: craft an online portfolio to be proud of
one.com
How to build a website for your creative business quickly and easily
Selection of work by Andreas Wannerstedt
15 brilliant portfolio examples, and why they work
Photograph of laptop with Shopify sticker, on table beside coffee mug, with woman on her phone out of focus in background
How to use Shopify: tips for beginners
Latest in Web Design
A screenshot of the new YouTube UI
Yes, YouTube has a new UI. Yes, it's terrible
Adobe XD logo
It seems Adobe's given up on UI design (for now)
Adobe Muse
Why Adobe is frustrating web designers
Dropbox Relay interface with photo of man running
How Dropbox Replay is helping designers future-proof their practice
UX revolution
From 2D to 3D: How brands can harness the latest UX/UI revolution
Personal portfolio of Julie Bonnemoy with a retro vibe
From AI to no-code: The top web design trends for 2024 according to Designmodo
Latest in How to
Rob Redman's snowy image illustrates the AE tutorial: TDW313.PT_AE_Snow.indd
How to create realistic snow with particle systems using After Effects
Ivan Mironenko ZBrush character tutorial
Craft a game-ready character asset using ZBrush and Substance 3D Painter
Mario Leone SpeedTree tutorial
How to make lifelike trees and vegetation with SpeedTree
Oliver Schümann ZBrush bizarre baby tutorial
Create a bizarre baby sculpture in ZBrush
Alireza Khoshpayam arch-viz tips
Speedy tips to create beautifully photoreal archviz using 3ds Max and Corona
Maya 3D abstract strands tutorial
How to easily create complex and abstract animation using Maya