万本电子书0元读

万本电子书0元读

顶部广告

Beginning Server-Side Application Development with Angular电子书

售       价:¥

5人正在读 | 0人评论 9.8

作       者:Bram Borggreve

出  版  社:Packt Publishing

出版时间:2018-04-30

字       数:38.0万

所属分类: 进口书 > 外文原版书 > 电脑/网络

温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印

为你推荐

  • 读书简介
  • 目录
  • 累计评论(0条)
  • 读书简介
  • 目录
  • 累计评论(0条)
Discover how to rapidly prototype SEO-friendly web applications with Angular Universal About This Book : ? Rapidly build an application that's optimized for search performance ? Develop service workers to make your application truly progressive ? Automatically update metadata and load in content from external APIs Who This Book Is For : This book is ideal for experienced front-end developers who are looking to quickly work through an intelligent example that demonstrates all the key features of server-side development with Angular. You'll need some prior exposure to Angular, as we skim over the basics and get straight to work. What You Will Learn : ? Use the official tools provided by Angular to build an SEO-friendly application ? Create a dynamic web application that maps to current Angular best practices ? Manage your Angular applications with Angular CLI ? Implement server-side rendering for your future web application projects ? Configure service workers to automatically update your application in the background In Detail : Equip yourself with the skills required to create modern, progressive web applications that load quickly and efficiently. This fast-paced guide to server-side Angular leads you through an example application that uses Angular Universal to render application pages on the server, rather than the client. You'll learn how to serve your users views that load instantly, while reaping all the SEO benefits of improved page indexing. With differences of just 200 milliseconds in performance having a measurable impact on your users, it's more important than ever to get server-side right. Style and approach : With this book, you'll be equipped to create modern, SEO-friendly web apps with best practices using Angular CLI. This book focuses on creating a progressive web app using Angular that is optimized for search engines.
目录展开

Beginning Server-Side Application Development with Angular

Table of Contents

Beginning Server-Side Application Development with Angular

Credits

Contributors

About the author

About the reviewer

Packt is searching for authors like you

Preface

Checking the Version

Development API

Installation of the API

Who This Book is for

Conventions

Reader Feedback

Customer Support

Downloading the Example Code

Errata

Piracy

Questions

1. Creating the Base Application

Lesson Objectives

Server-Side and Client-Side Rendering

Installing Angular CLI

Generating a New Application

Creating a New Application

Serving the Application

Viewing Your Application

Setting Defaults for Angular CLI

Configuring Global Defaults

Configuring Global Styles

Linking to the Style Sheets in global styles.css

Adding Bootstrap and Font Awesome

Showing an Icon on the Page

Creating UI Modules and Components

Creating the UiModule

Importing Our UiModule

Displaying the Current Route

Creating the LayoutComponent

Adding a New Route

Building Our Layout

Creating the HeaderComponent

Updating the LayoutComponent to Reference Our New HeaderComponent

Creating the Actual Header

Creating the FooterComponent

Updating the LayoutComponent to Reference Our New FooterComponent

Creating the Actual Footer

Summary

2. Creating the Application Module and Components

Lesson Objectives

Types of Components

Presentational Components

Container Components

Folder Structure

Generate and Lazy Load the PostsModule

Creating the Container Components

Creating PostsComponent and ProfileComponent

Adding Dummy Post and Profile Data

Creating a Service to Retrieve Data

Generating the Service

Storing Our API URL

Referencing Our New PostsService in Our Container Components

Defining the Public Methods

Importing HttpClientModule in Our AppModule

Creating the Presentational Components

Creating the PostListComponent

Creating the PostItemComponent

Creating the ProfileItemComponent

Creating Resolvers to Retrieve Data Using the Router

Creating Resolvers

Importing Our Resolvers

Using the Data Resolved by the Router

Summary

3. Server-Side Rendering

Lesson Objectives

Generating the Server App

Generating the Angular Universal Application

Making Our Apps Consistent

Adding Dependencies for the Server App

Adding the Server App to Our Angular CLI Configuration

Adding Run Scripts to package.json

Adding npm Scripts

Testing the Builds of Both Apps

Implementing a Web Server

Installing Server Dependencies

Creating the server.ts File

Adding the npm Script to package.json

Starting the Server

Adding Dynamic Metadata

Creating the UiService

Adding Metadata to PostsComponent and ProfileComponent

Summary

4. Service Workers

Lesson Objectives

What Is a Service Worker?

What Is a Progressive Web App?

Installing Dependencies

Enabling the Service Worker

Importing the ServiceWorkerModule

Creating the Service Worker Configuration

Configuring the Service Worker

Asset and Data Groups

Configuring the Asset and Data Groups

Testing the Service Worker

Checking Where the Data Comes from

Enabling Offline Mode

Running a Local Build of the Browser App

Inspecting the Behavior

Setting Our Application to Offline Mode

Debugging the Service Worker

Chrome Developer Tools to the Rescue

Locating the Running Service Worker

Unregistering the Registered Service Worker

Summary

Index

累计评论(0条) 0个书友正在讨论这本书 发表评论

发表评论

发表评论,分享你的想法吧!

买过这本书的人还买过

读了这本书的人还在读

回顶部