Book Image

The Node Craftsman Book

By : Manuel Kiessling
Book Image

The Node Craftsman Book

By: Manuel Kiessling

Overview of this book

The Node Craftsman Book helps JavaScript programmers with basic Node.js knowledge to now thoroughly master Node.js and JavaScript. This book dives you deeper into the craft of software development with Node.js and JavaScript, incuding object-orientation, test-driven development, database handling, web frameworks, and much more. The Node Craftsman Book shows you how to work with Node.js and how to think deeply about how you build your Node projects. You'll master how to build a complete Node.js application across six crafting milestones, and you'll learn many specific skills to achieve that mastery. These skills include how to work with the Node Package Manager in depth, how to connect your Node applications to databases, and how to write unit tests and end-to-end tests for your code. You'll experience the full Node.js development picture, and learn how to craft and control your Node.js applications - right through to fully-fledged web applications using REST, and integration with Angular applications.
Table of Contents (17 chapters)
Free Chapter
Part 1: Node.js Basics in Detail
Working with NPM and Packages
Test-driven Node.js Development
Milestone 1 – A First Passing Test Against the Server
Milestone 3 – Setting the Stage for a Continuous Delivery Workflow

Adding AngularJS view templates

With this, the JavaScript code for our AngularJS app is in place, but we aren't done yet. We also need four HTML views for the app: The main view with the editor, plus three custom grid cell templates, one for the operations column that holds the Save and Delete controls, one for the Category column cells (because there we need to translate from category IDs to category names), and one for the Category cells in edit mode, because when we edit the category of a keyword, we don't want to edit its name as a string, but rather choose from a list of existing categories through a dropdown control.

We start with src/frontend/app/keywords/partials/editor.html:

< div class="span12" >
      ng-init="newKeyword.value = ''"