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 September 14th, 2016, 11:11 PM
Registered User
 
Join Date: Sep 2016
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Property 'stocks' is undefined in watchlist.js

Hi,

I am on page 35 now and am struggling with corrections and work-arounds everyone had to go through up till now. Last two were:
  1. Replace ng-options with bs-options in l.19 of addstock-modal.html (ng-options requires 'select' element issue)
  1. Replace _.contains with _.includes in l. 13 of main.js (lodash bug)

The app is somewhat working as expected in Firefox, but I am getting this error in Chrome:

Quote:
angular.js:13920 TypeError: Cannot read property 'stocks' of undefined
at new <anonymous> (http://localhost:9000/scripts/contro...hlist.js:15:37)
at Object.instantiate
That line in watchlist.js is this:
Quote:
$scope.stocks = $scope.watchlist.stocks;
Also when navigating to a watchlist this is the url in the browser:
On the watchlist page I get
Quote:
{{watchlist.description}}
in the .panel-heading.

Lastly the add-stock modal is not opening when clicking on the + button. All that functions in Firefox.

Thank you in advance for your consideration and attention.

Last edited by vasigorc; September 14th, 2016 at 11:16 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
data.js:14 Uncaught TypeError: Cannot read property 'id' of undefined bholar Javascript 2 June 6th, 2019 05:13 AM
solution for adding new stocks and displaying modal PuX BOOK: Professional AngularJS 0 January 29th, 2016 02:15 PM
chp 01, get[property name] and set[property name] sandeepgreaternoida BOOK: Professional PHP 5 ISBN: 978-0-7645-7282-1 0 May 12th, 2009 01:12 AM
Ajax Cart update Undefined Property modelreject BOOK: Professional CodeIgniter ISBN: 978-0-470-28245-8 1 March 16th, 2009 10:04 AM





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