Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf

所需积分/C币:9 2018-01-09 23:17:10 7.31MB PDF
收藏 收藏
举报

Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf
Essential Angular for AsP. NET Core MVC Adam freeman London uk ISBN-13(pbk):978-1-4842-2915-6 ISBN-l3( electronic:978-1-4842-2916-3 DOI10.1007/978-1-4842-2916-3 Library of Congress Control Number: 2017949481 Copyright o 2017 by Adam Freeman This work is subject to copyright All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark The use in this publication of trade names, trademarks service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights While the advice and information in this book are believed to be true and accurate at the date of publication neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made The publisher makes no warranty express or implied with respect to the material contained herein CoverimagebyFreepik(www.freepik.com Managing director: Welmoed spahr Editorial director. Todd green Acquisitions Editor: Gwenan Spearing Development Editor: Laura berenson Technical reviewer: Fabio claudio ferracchiati Coordinating Editor: Mark Powers Copy Editor: Kim Wimpsett Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax(201)348-4505, e-mail orders-ny@springer-sbm.comorvisitwww.springeronline.comApressMedia,LlcisaCaliforniaLlc and the sole member(owner)is Springer Science Business Media Finance Inc(SSBM Finance Inc) SSBM Finance Inc is a Delaware corporation Forinformationontranslationspleasee-mailrights@apress.com,orvisitwww.apress.com/ rights-permisslons Apress titles may be purchased in bulk for academic, corporate, or promotional use e Book versions and licenses are also available for most titles for more information reference our print and e book bulk sales webpageatwww.apress.com/bulk-sales Any source code or other supplementary material referenced by the author in this book is available to readersonGithubviathebooksproductpage,locatedatwww.apress.com/9781484229156.Formore detailedinformationpleasevisitwww.apress.com/source-code Printed on acid-free paper Dedicated to my lovely wife, Jacqui griffith (And also to Peanut. Contents at a glance About the author About the technical reviewer ■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ XVI Chapter 1: Understanding Angular and AsPnet Core MVc Chapter 2: Getting Ready ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 5 Chapter 3: creating the project ammmmmmamnmmmmammmammmma 21 Chapter 4: Creating the Data Model 43 Chapter 5: Creating a web Service ■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■口■■■■■ 69 Chapter 6: Completing the Web Service ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 103 Chapter 7: Structuring an Angular Application mmmmmmmmam 135 Chapter 8: Creating the Store 159 Chapter 9: completing the Angular Store mmmmmmMRRIRIIamImna 187 Chapter 10: Creating Administration Features naama amama 227 Chapter 11: Securing the Application 251 Chapter 12: Preparing for Deployment IIamImnaI 279 Index…u295 Contents About the author About the technical reviewer ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ XVI Chapter 1: Understanding Angular and AsPNet Core MVC 1 Who Is this book for? What does this book cover? What doesnt This book cover? ■■圆圆■ What do you need to know Are There Lots of Examples? Where Can You Get the Example Code? Where Can You get Corrections for this book? Contacting the Author. Summary Chapter 2: Getting Ready ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Getting Ready on Windows Installing NET Core............................. Installing Node js.… 444556688 Installing git stalling Docker...,……… Installing Visual Studio 2017 Installing Visual Studio code Getting Ready on Linux… Installing NeT Installing Node s 日日自日日日面日日面日自日日面日面日自日面日日日面日日自日日日面日自日面日自日日日面日自日面日自日日面日日自日日日面日日自日日m CONTENTS Installing Git. 13 Installing docker 14 Installing Visual Studio Code......................15 Getting ready on macOS 15 Installing NET Core 16 Installing Node js 16 Installing Git. 7 Installing Docke Installing visual studio code 19 Summary 19 Chapter 3: Creating the Project mmm aaaIn 21 Preparing to create a Project 21 Creating the project 22 Creating the angular part of the project 22 Creating the asp. net core Mvc part of the project 24 Configuring the project 面m 25 Removing Files…,.,.,.,.,,…,…,………30 Updating the Controller, Layout, and viet Running the project 32 Understanding the Combined Project and Tools 34 Understanding the Structure of the project.... 34 Understanding the tool Integration. Detecting Type Script Errors …38 Summary… 41 Chapter 4: Creating the Data Model 43 Preparing for This chapter…..,,,,,… 43 Starting the Data Model 44 Preparing the Database Server....…,…44 Creating the ASP.NeT Core MVC Data Model 46 Starting the angular data model .. Understanding the type script data Model classes 56 Integrating the angular data model Displaying the Data...,……,…,,…….63 Reviewing the Application Structure 66 Reviewing the aSP neT Core MVC Application Structure. Reviewing the Angular Application Structure Summary…,,,, 68 Chapter 5: Creating a Web Service ■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■ 69 Preparing for This chapter. Introducing a Web Service DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 71 Understanding RESTful Web Services Creating the web service Using the Web Service in the angular application. oading related Data . Implementing the GET Method for Multiple objects 90 Implementing the Web Service Action Method 90 Querying Multiple objects in the Angular Application...................... 92 Filtering the Data....,.,,……96 Understanding the structure of the Web service 100 Summary 101 Chapter 6: Completing the Web Service 103 Preparing for This chapter 103 Implementing the POST Method 104 Understanding the apl enhancements. Creating the Data Binding Classes 105 Implementing the Web Service Action Methods 107 Creating Data Objects in the Angular Application 110 Implementing the PUt Method. Implementing the Web Service Action Methods 115 Replacing Products in the Angular Application 117 CONTENTS Implementing the PATCH Method 120 Understanding Json Patch 121 Enhancing the Product Binding Target 122 mplementing the Web Service Action Meth0d....,,,…………123 Updating Objects in the Angular Application…....,.,.…,………….124 Implementing the DELETE Meth0d……,… 127 Configuring the database ..................................................................................128 Implementing the Web Service Action Method. Deleting Objects in the Angular Application …131 Summary 134 Chapter 7: Structuring an Angular Application maan 135 Preparing for This chapter 136 Using the Data Model for component Cooperation…...,,…,…137 Creating the Display Component 137 Creating the Filter Component 140 Applying the New components............................... 141 Understanding the application Structure. Adding Another Component.. 143 Understanding Angular Routing. Creating the routing configuration ................................147 Applying the Routing Configuration... 149 Navigating Using Routes 150 Improving navigation 面m 153 Understanding the application structure 158 Summary 158 Chapter 8: Creating the Store ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 159 Preparing for This chapter….....….160 Starting the product Selection Feature 161 Blocking out the Feature components. .................................................................161 Configuring the Angular URL Routes …167 Removing the layout header 167 CONtENTS Displaying the Product List 168 Understanding the Product List Template Features 169 Creating the Category Filter ,171 Enhancing the ASP. NET Core MVC Application..... 172 Receiving Category Data in the angular Data Repository. Updating the Filter component and Template .. Creating the pagination Controls. Creating and registering a Pagination Service . Updating the Pagination Button Component 178 Paging the Product Data.... Displaying ratings… 181 Adding the Font Awesome Package…...,.,,,…18 Updating the Rating Component and Template 182 Applying the Rating Component...…………184 Summary. 186 Chapter 9: Completing the Angular Store ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 187 Preparing for This chapter DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD 187 Creating the Shopping Cart 188 Extending the Angular Data Model Registering the Cart as a Service…… 190 Wiring Up the Buttons.… 191 Creating the cart Summary Component……… Displaying the Cart Detail Storing carts 197 Extending the ASP. NeT Core MVc Data Model 198 Creating the cart Storage Web Service...,……….199 Storing and Retrieving Cart Data Creating the Checkout Process 206 Extending the ASP. NET Core MVC Data Model ... 日面日日面日日面日日日日日日日日日日日日日日日 Creating the ASP.NET Core MVC Creating the Angular Checkout Process

...展开详情
试读 127P Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf
立即下载 低至0.43元/次 身份认证VIP会员低至7折
    抢沙发
    一个资源只可评论一次,评论内容不能少于5个字
    关注 私信 TA的资源
    上传资源赚积分,得勋章
    最新推荐
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf 9积分/C币 立即下载
    1/127
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第1页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第2页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第3页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第4页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第5页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第6页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第7页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第8页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第9页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第10页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第11页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第12页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第13页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第14页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第15页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第16页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第17页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第18页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第19页
    Apress.Essential.Angular.for.ASP.NET.Core.MVC.1484229150.pdf第20页

    试读已结束,剩余107页未读...

    9积分/C币 立即下载 >