Implementing the Billing View
When the user clicks the Continue to Billing button in the shipping view, the billing view appears, allowing the user to then enter billing information. The billing view, shown in Listing 28.17, provides a series of input fields to input the billing information.
The billing template code is similar to the shipping template code, with the addition of a few new fields. The Card radio buttons to select the credit card are bound to the customer.billing[0].cardtype
value in the scope. When you change the radio button selection, the model also changes.
The values for the <select>
drop-down options come from simple arrays defined in the scope and are bound to the customer.billing[0]
data as well. For example, the following ...
Get Node.js, MongoDB, and AngularJS Web Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.