Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Getting Started with Web Components

You're reading from   Getting Started with Web Components Build modular and reusable components using HTML, CSS and JavaScript

Arrow left icon
Product type Paperback
Published in Aug 2019
Publisher Packt
ISBN-13 9781838649234
Length 158 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Prateek Jadhwani Prateek Jadhwani
Author Profile Icon Prateek Jadhwani
Prateek Jadhwani
Arrow right icon
View More author details
Toc

Integrating Web Components in Angular

Let's say that we have an already-existing Angular app. This could be a full-fledged project or a starter app, and we want to use the <header-image> web component in an Angular component. We'll start with the setup.

Setting up an Angular project

Let's say that we want to start with a starter app. We can follow the steps given at the following URL to install and serve the starter app: https://angular.io/guide/quickstart.

Angular does not support Vanilla Web Components by default, so even before we start using Web Components, though, we need to tell Angular that we want to use a web component. We can do so by adding the following code in the app.module.ts file...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime