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 February 24th, 2016, 01:10 PM
Registered User
 
Join Date: Feb 2016
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default CH 1 Step 5: ReferenceError: _ is not defined

I'm having trouble getting the application to work on Chapter 1 Step 5. I've even tried copying the downloaded sample code over my working code and I still receive the same message.

ReferenceError: _ is not defined
at WatchlistService.loadModel (watchlist-service.js:58)
at new WatchlistService (watchlist-service.js:107)
at invoke (angular.js:3967)
at Object.instantiate (angular.js:3978)
at Object.<anonymous> (angular.js:3846)
at Object.invoke (angular.js:3967)
at angular.js:3809
at getService (angular.js:3931)
at invoke (angular.js:3958)
at Object.instantiate (angular.js:3978)(anonymous function) @ angular.js:10147

There is also a reference error, but I do not know if it is related or not:

Failed to load resource: the server responded with a status of 404 (Not Found)

http:// localhost:9000/bower_components/ lodash/dist/lodash.compat.js

Any help would be appreciated. This entire chapter has been one misstep after the next for me.

Edit: this forum insisted on shortening my url for me so the spaces there are intentional

Last edited by JonStalnaker; February 24th, 2016 at 01:13 PM.. Reason: it keeps autoformatting and shortening my url
 
Old February 24th, 2016, 01:56 PM
PuX PuX is offline
Registered User
 
Join Date: Jan 2016
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

did you run bower install in that folder?

the error tells you lodash is missing.
 
Old February 24th, 2016, 02:37 PM
Registered User
 
Join Date: Feb 2016
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Looks like adding

<script src="bower_components/lodash/lodash.js"></script>

to the index.html file solved the functionality problem but the error still appears in the console.

Last edited by JonStalnaker; February 24th, 2016 at 02:52 PM..





Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Runtime Error 1004 “Application-defined or Object-defined error” ravi_bms Access VBA 0 March 11th, 2015 02:47 AM
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 03:44 PM
DataRowView Type Not Defined (CH 14) kmwilliams5 ASP.NET 3.5 Basics 5 April 25th, 2009 05:07 AM
Ch 8 pg 282 Step 11 workib BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 3 May 26th, 2008 04:19 PM
Ch.8 pg270 step 3 RomeyRome BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 November 5th, 2007 02:59 PM





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