Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Beginning Server-Side Application Development with Angular [Instructor Edition]
  • Table Of Contents Toc
Beginning Server-Side Application Development with Angular [Instructor Edition]

Beginning Server-Side Application Development with Angular [Instructor Edition]

By : Bram Borggreve
close
close
Beginning Server-Side Application Development with Angular [Instructor Edition]

Beginning Server-Side Application Development with Angular [Instructor Edition]

By: Bram Borggreve

Overview of this book

In this course we will learn how to use Angular to create a Progressive Web App (PWA) that has great support for SEO. To understand what this exactly means we need to dissect the terms in the last sentence. A Progressive Web App is a regular web app that are enhanced to work on mobile, with support for working offline or with slow connections et. al. Building support for SEO means that search engines can read and understand the pages, and that the pages have dynamic data the is specifically aimed to search engines (meta tags). We will end with a dynamic single page web application that behaves like a server-rendered application.
Table of Contents (10 chapters)
close
close

Setting Defaults for Angular CLI


Angular CLI works great out of the box and the default setup delivers a nice configuration to work with. But in addition to having some sane defaults, it is also very configurable.

In this book, we will take the opportunity to configure our Angular CLI defaults so it behaves a little bit differently.

The things we are going to change all have to do with how we generate (or scaffold) our code.

When scaffolding components, the default Angular CLI settings will create the HTML template and style sheet in a separate file.

In order to keep all component content in one file, we will configure Angular CLI to generate inline templates and styles.

The advantage of keeping all the component content in one file is that you can work on templates, styles, and the actual component code in a single place without having to switch files.

Configuring Global Defaults

In your terminal, run the following commands to globally configure the defaults:

ng set defaults.component.inlineStyle true
ng set defaults.component.inlineTemplate true

When we run the git diff command, we see that these settings are stored in the .angular-cli.json file in our application:

In this section, we have configured Angular CLI to generate inline styles and templates.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Beginning Server-Side Application Development with Angular [Instructor Edition]
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon