从零开始构建下一代Web应用:Angular 2实战指南

需积分: 4 3 下载量 43 浏览量 更新于2024-07-19 收藏 2.14MB PDF 举报
"《Learning Angular 2》是一本专为希望利用Angular 2构建下一代现代化移动和桌面Web应用的Web开发者设计的原版PDF教程。本书并不依赖于Angular 1.x或2的经验,但假设读者对JavaScript有全面的理解。对于初次接触Angular并偏好通过清晰解释和概念定义学习的新手来说,这本书尤为适合。 本书内容分为两个主要部分: 1. 创建我们的第一个Angular 2组件:章节从一个全新的起点开始,探讨了Web组件的概念,强调了为何选择TypeScript而非其他语法。作者指导读者如何设置开发环境,包括安装必要的依赖项如TypeScript和TypeScript类型定义。"Hello, Angular 2!" 一节介绍了TypeScript类的使用,以及元数据装饰器的引入,这是Angular 2中的一个重要特性。接着,讲解了如何将TypeScript编译为浏览器兼容的JavaScript,并讨论了HTML容器在项目中的作用。书中还提供了如何运行书中的示例代码,并优化IDE(如Sublime Text 3、Atom、Visual Studio Code和WebStorm)来提升开发效率。 2. TypeScript入门:这部分深入介绍TypeScript,一种JavaScript超集,它为Angular 2开发提供了强大的静态类型系统。章节涵盖了TypeScript的基本概念,帮助读者理解其与JavaScript的不同之处,以及为何在Angular 2项目中采用TypeScript能提高代码质量和可维护性。 通过本书,读者不仅能够掌握Angular 2的基础知识,还能学习到如何利用组件方法处理数据更新,实现组件交互性,以及如何优化视图中的数据输出和UI设计。作者用简单易懂的方式引导读者逐步构建实际项目,确保读者在学习过程中能够快速上手,并不断提升开发技能。 《Learning Angular 2》是一本为Angular新手量身打造的实用指南,无论你是初次接触Angular还是希望深入了解其最新版本,都能从中收获丰富的知识和实践经验。"
2016-12-23 上传
Learning Angular 2 English | 31 May 2016 | ISBN: 1785882074 | 352 Pages | AZW3/MOBI/EPUB/PDF (conv) | 6.1 MB Your quick, no-nonsense guide to building real-world apps with Angular 2 About This Book The first and best overview of Angular 2 on the market―this guide gathers together everything there is to know about Angular 2 and groups it into intuitive sections. This book is your detailed map of every feature and its use cases. The author has done all the hard work of fitting everything Angular 2 means for developers together for you, making this book the quickest way to learn Angular 2 from scratch. Who This Book Is For This book is targeted at web developers who want to build the next generation of state-of-the-art mobile and desktop web applications with Angular 2. This book does not require you to have prior exposure to either Angular 1.x or 2, although comprehensive knowledge of JavaScript is assumed. It's great for newcomers to Angular who learn best through clear explanations and definitions of concepts. What You Will Learn Set up your working environment in order to have all the tools you need to start building Angular 2 components with minimum effort Get up to speed with TypeScript, a powerful typed superset of JavaScript that compiles to plain JavaScript Take full control of how your data is rendered and updated upon data changes Build powerful web applications based on structured component hierarchies that emit and listen to events and data changes throughout the elements tree Explore how to consume external APIs and data services and allow data editing by harnessing the power of web forms made with Angular 2 Deliver seamless web navigation experiences with application routing and state handling common features with ease Discover how to bulletproof your applications by introducing smart unit testing techniques and debugging tools In Detail Angular 2 was conceived as a complete rewrite in order to fulfill the expectations of modern developers who demand blazing fast performance and responsiveness from their web applications. This book will help you learn the basics of how to design and build Angular 2 components right from the beginning, providing full coverage of the TypeScript syntax required to follow the examples included. From that point on, we will build upon our first components, interconnect them, and give shape to larger web applications. We will then move to implementing routing in Angular 2, analyzing how to handle application states, and navigating from one component to another in depth. After this, the book features full coverage of web forms and user input validation, later leveraging all of this information to go through the basics of implementing user authentication in Angular 2 and providing a bird's eye view of the different strategies at hand to secure pages and areas of your website. Animating components and DOM elements with Angular 2 is also covered in this book. The final part of this book provides broad insights into how to unit test components and other modules such as services, directives, routes or pipes. Style and approach This book covers everything there is to know about getting well-acquainted with Angular without bogging you down. Everything is neatly laid out under clear headings for quick consultation, offering you the information required to understand a concept immediately, with short relevant examples of each feature.
2018-02-13 上传
Over the past years, Angular 1.x has became one of the most ubiquitous JavaScript frameworks for building cutting edge web applications, either big or small. At some point, its shortcomings with regard to performance and scalability became too prominent as soon as applications grew in size and complexity. Angular 2 was then conceived as a full rewrite from scratch to fulfill the expectations of modern developers, who demand blazing fast performance and responsiveness in their web applications. Angular 2 has been designed with modern web standards in mind and allows full flexibility when picking up your language of choice, providing full support for ES6 and TypeScript, but working equally well with today's ES5, Dart, or CoffeeScript. Its built-in dependency injection functionalities let the user build highly scalable and modular applications with an expressive and self-explanatory code, turning maintainability tasks into a breeze, while simplifying test- driven development to the max. However, where Angular 2 stands out is when it shows off its unparalleled level of speed and performance, thanks to its new change detection system that is up to five times faster than its previous incarnation. Cleaner views and an unsurpassed standards-compliant templating syntax compound an endless list of powerful features for building the next generation of web mobile and desktop apps. Angular 2 is here to stay and will become a game changer in the way modern web applications are envisioned and developed in the years to come. However, and due to its disruptive design and architecture, learning Angular 2 might seem a daunting effort to newcomers. This is where this book comes in—its goal is to avoid bloating the reader with API references and framework descriptions, but to embrace a hands-on approach, helping the reader learn how to leverage the framework to build stuff that matters right from day one. This is learning by doing right from the start. This book aims to give developers a complete walkthrough of this new platform and its TypeScript-flavored syntax by building a web project from back to forth, starting from the basic concepts and sample components and iterating on them to build up more complex functionalities in every chapter until we launch a complete, tested, production-ready sample web application by the end of the book.