Book Image

Server-Side Enterprise Development with Angular

By : Bram Borggreve
Book Image

Server-Side Enterprise Development with Angular

By: Bram Borggreve

Overview of this book

With the help of Server-Side Enterprise Development with Angular, equip yourself with the skills required to create modern, progressive web applications that load quickly and efficiently. This fast-paced book is a great way to learn how to build an effective UX by using the new features of Angular 7 beta, without wasting efforts in searching for referrals. To start off, you'll install Angular CLI and set up a working environment, followed by learning to distinguish between the container and presentational components. You'll explore advanced concepts such as making requests to a REST API from an Angular application, creating a web server using Node.js and Express, and adding dynamic metadata. You'll also understand how to implement and configure a service worker using Angular PWA and deploy the server-side rendered app to the cloud. By the end of this book, you'll have developed skills to serve your users views that load instantly, while reaping all the SEO benefits of improved page indexing.
Table of Contents (5 chapters)

1. Creating the Base Application

Activity 1: Using a BootSwatch Theme

Solution:

  1. Navigate to BootSwatch Themes (https://www.bootstrapcdn.com/bootswatch/) on BootstrapCDN.
  2. Select one of the themes and copy the link to the CSS:
    Figure 1.31: Selecting the Darkly theme
    Figure 1.31: Selecting the Darkly theme
  3. Update the link to Bootstrap CSS in src/styles.css:
    @import url('https://stackpath.bootstrapcdn.com/bootswatch/4.1.3/darkly/bootstrap.min.css');
  4. Refresh the app in the browser and verify that the theme has been updated:
Figure 1.32: Thumbs-up icon in the Darkly theme

Activity 2: Using Different Font Awesome Icons

Solution:

  1. Open the src/app/app.component.html file.
  2. Navigate to the Font Awesome icon list at https://fontawesome.com/v4.7.0/icons/.
  3. Replace the value of fa-thumbs-up with another icon. Note that you always need the fa class:
    <i class="fa fa-trash"></i>
  4. Refresh the app in the browser and verify that the browser...