Wrox Programmer Forums
|
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 August 19th, 2015, 12:03 PM
Registered User
 
Join Date: Aug 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default "Add New Stock" not functioning

Hello. On Step 5, I'm getting the following error in my console:

TypeError: Cannot read property 'push' of undefined
at Object.WatchlistService.WatchlistModel.addStock (watchlist-service.js:24)
at Scope.$scope.addStock (watchlist.js:28)
at angular.js:10903
at angular-touch.js:441
at Scope.$eval (angular.js:12811)
at Scope.$apply (angular.js:12909)
at HTMLButtonElement.<anonymous> (angular-touch.js:440)
at HTMLButtonElement.jQuery.event.dispatch (jquery.js:4435)
at HTMLButtonElement.elemData.handle (jquery.js:4121)

I've followed the code as the book details, so advice would be much appreciated.

Thanks.
 
Old August 19th, 2015, 04:53 PM
Registered User
 
Join Date: Aug 2015
Posts: 8
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Ugh. I figured this out, for future reference: Several hours debugging later, I finally tried deleting and then re-adding all the titles in the watchlist, like Technology, Financial, etc. Now it works! Again, ugh.
 
Old February 24th, 2016, 02:34 PM
Registered User
 
Join Date: Feb 2016
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same thing for me. Delete and recreate and the issue resolved.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with "Add New" cmdbtn Unbound Form Dissconnected Recordset iamerin BOOK: Beginning Access 2007 VBA ISBN: 978-0-470-04684-5 1 October 15th, 2015 03:30 AM
Chapter 12 "Stock Widget" CodeNewbe BOOK: Professional Ajax 2nd Edition ISBN: 978-0-470-10949-6 0 October 2nd, 2014 10:12 AM
MSXSL gives error message for "for" inside "select" ilyaz XSLT 1 December 9th, 2010 05:02 PM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM





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