掌握Angular 2:构建、测试游戏与健身应用实战指南

4星 · 超过85%的资源 需积分: 10 66 下载量 74 浏览量 更新于2024-07-20 1 收藏 4.53MB PDF 举报
《Angular.2.By.Example》是一本深入讲解Angular 2框架的实战指南,作者通过构建三个不同类型的应用来帮助读者掌握Angular 2的开发方法和技巧。本书的关键内容包括: 1. **Angular 2基础知识**:首先,读者将学习Angular的基本概念,如组件模式在Web应用中的应用,以及为什么Angular 2采用这种模式。Angular 2之前的版本中,组件的广泛应用是新版本的一大亮点。 2. **组件和模板设计**:书中详细介绍了如何使用组件设计应用程序,包括设计和实现组件,以及利用Angular的视图模板和数据绑定功能。这涉及到创建HTML页面、自定义元素、组件文件的编写,以及使用装饰器定义类和模块。 3. **SPA(单页应用)与路由**:章节3中,读者将进一步学习如何构建Single Page Applications,并探索Angular 2中的路由机制以及数据流管理。 4. **个人健身应用——Personal Trainer**:本书的核心部分是逐步构建一个健身应用,从基础的7分钟锻炼应用扩展到一个完整的个人训练助手。这个阶段涵盖了高级指令的创建,这是Angular 2中最核心且强大的特性之一。 5. **服务器端数据持久化与集成**:章节5介绍如何与后端服务器协作,处理数据的获取和存储,以及Angular 2如何支持这些操作。 6. **Angular 2指令深度解析**:深入理解指令的作用,包括结构指令、属性指令,以及它们如何扩展标准HTML行为。 7. **测试实践**:在第7章,作者会教授如何有效地测试Angular应用,提供实用的测试策略和技巧。 8. **实用场景与挑战**:最后一部分总结了实际开发中可能遇到的问题及其解决方案,帮助读者在Angular 2环境中更好地应对挑战。 这本书适合希望通过实践学习Angular 2并提升跨平台应用开发效率的开发者,无论他们是初学者还是有一定经验的Angular用户。读者可以期待从设计、开发、部署到测试的全程指导,以及对TypeScript语言的支持和Angular 2最新特性的深入了解。通过阅读本书,读者将能掌握Angular 2的新架构,提高代码组织性和可测试性,从而更快地构建高质量的应用程序。
2016-11-18 上传
Angular 2 By Example by Chandermani Arora English | 4 Nov. 2016 | ISBN: 178588719X | 458 Pages | MOBI/EPUB/PDF | 12.97 MB Angular 2 will help you build faster, more efficient, and more flexible cross-platform applications. Angular 2 is known for taking the pain out of JavaScript development, enabling more organized, readable, and testable code. Key Features 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 platform Book Description This book builds three apps with varying degrees of complexity. It starts with a simple "Guess the Number" game, which serves as a platform to launch you into the world of Angular. Next you will learn to construct a popular "7-Minute Workout "app, covering the building blocks of Angular. The final app, "Personal Trainer" morphs the existing "7-Minute Workout" into a full-fledged personal workout builder and runner, covering advanced directive building, which is the most fundamental and powerful feature of Angular. In addition to this, you will learn about testability and the framework constructs Angular provides to effectively test your app. The book concludes by providing you with practical advice and useful tips that will come in handy as you build more and more apps with Angular. What you will learn Design, develop, deploy, and test the apps you build Work your way through every aspect of app development using Angular2 Understand the inner workings of Angular's view templating and data-binding capabilities Work on HTML forms and learn the Angular way to bind, validate, and form data Create component, structural, and attribute directives to extend standard HTML behavior Integrate with the server backend and find out about data retrieval and persistence using Angular Gain practical insight into the challenges of building apps using Angular as well as their solutions