Cargando…

Angular 2 By Example.

Discover everything you need to know to build your own Angular 2 applications the hands-on wayAbout This Book Master the Angular way to structure, build, deploy, and test your code Understand Angular 2's new component-based architecture Build a game and workout runner apps on the Angular platfo...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Arora, Chandermani
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Packt Publishing, 2016.
Edición:1.
Temas:
Acceso en línea:Texto completo
Tabla de Contenidos:
  • Cover; Copyright; Credits; About the Authors; About the Reviewer; www.PacktPub.com; Table of Contents; Preface; Chapter 1: Getting Started; Angular basics; The component pattern; Using the component pattern in web applications; Why weren't components used before in Angular?; What's new that enables Angular to use this pattern?; Web Components; Angular and Web Components; Language support in Angular; ES2015; TypeScript; Putting it all together; Angular modules; The basic steps to building Angular applications; The customary Hello Angular app
  • Guess the Number!; Setting up a development server.
  • Building Guess the Number!Designing our first component; The host file; An HTML page; Script tags; Custom elements; The component file; The import statement; Decorators; Defining the class; The module file; Bootstrapping; We're up-and-running!; Digging deeper; Interpolation; Tracking changes in the number of tries; Expressions; The safe navigation operator; Data binding; Property binding; Event binding; Structural directives; Revisiting our app; Looking at how our code handles updates; Maintaining the state; Component as the container for the state; Change detection; Initializing the app.
  • Loading the modules needed by our applicationBootstrapping our app; Tools; Resources; Summary; Chapter 2: Building Our First App
  • 7 Minute Workout; What is 7 Minute Workout?; Downloading the code base; Setting up the build; The build internals; Code transpiling; Organizing code; The 7 Minute Workout model; App bootstrapping; App loading with SystemJS; Our first component
  • WorkoutRunnerComponent; Component life cycle hooks; Building the 7 Minute Workout view; The Angular 2 binding infrastructure; Interpolations; Property binding; Property versus attribute; Property binding continued ...
  • Quick expression evaluationSide-effect-free binding expressions; Angular directives; Target selection for binding; Attribute binding; Style and class binding; Attribute directives; Styling HTML with ngClass and ngStyle; Exploring Angular modules; Comprehending Angular modules; Adding a new module to 7 Minute Workout; Learning more about an exercise; Adding descriptions and video panels; Providing component inputs; Structural directives; The ever-so-useful NgFor; NgFor performance; Angular 2 security; Trusting safe content; Formatting exercise steps with innerHTML binding.
  • Displaying the remaining workout duration using pipesAngular pipes; Implementing a custom pipe
  • SecondsToTimePipe; Adding the next exercise indicator using ngIf; Pausing an exercise; The Angular event binding infrastructure; Event bubbling; Event binding an event object; Two-way binding with ngModel; Summary; Chapter 3: More Angular 2
  • SPA, Routing, and Data Flows in Depth; Exploring Single Page Application capabilities; The Angular SPA infrastructure; Angular routing; Angular router; Routing setup; Pushstate API and server-side url-rewrites; Adding start and finish pages.