Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Professional AngularJS
|
BOOK: Professional AngularJS
This is the forum to discuss the Wrox book Professional AngularJS by Valeri Karpov, Diego Netto; ISBN: 978-1-118-83207-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional AngularJS section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 7th, 2015, 07:35 AM
Registered User
 
Join Date: May 2015
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Template fails if it contains comments at the start!

In step 7 of chapter 1, you have to create a template file that is supposed to display the stocks of a watchlist in a table. (stock-table.html)

When I tested the app in my browser, it failed to display the table and I couldn't figure out why. Loads of analyzing with the browser's developer tools didn't show any problem.

Then I backed up my whole 'app' folder and replaced all files with those from the download and the app worked. Then I restored everything file by file until the error happened again and it turned out that it was the file mentioned above!

I compared the original and my own file and eventually, the only difference was the comments (my addition) at the start of the file, before the first HTML tag. When I moved those comments below the first tag, it worked!

Failing template:
Code:
<!-- 
Stock Table Template

Notes:
  Inside the <thead>, the Price Change header cell contains two spans with ng-click directives 
  that assign a value to the showPercent scope variable (...) -->

<table class="table">
<thead>
(....)
Working Template:
Code:
<table class="table">
<!-- 
Stock Table Template

Notes:
  Inside the <thead>, the Price Change header cell contains two spans with ng-click directives 
  that assign a value to the showPercent scope variable 
(...)  -->
<thead> (....)
However, having comments at the beginning is no problem with other templates!





Similar Threads
Thread Thread Starter Forum Replies Last Post
INSERT Article fails also category fails too f117f117f117677 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 3 November 4th, 2009 09:20 AM
Tomcat Fails to start in Windows server LiquidLen Apache Tomcat 1 January 18th, 2009 02:10 PM
Comments janees ASP.NET 1.0 and 1.1 Professional 1 April 8th, 2007 09:27 PM
server fails to start z_idane Apache Tomcat 0 December 18th, 2005 12:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.