Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Professional AngularJS
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old February 24th, 2016, 01:10 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
Reply With Quote
  #2 (permalink)  
Old February 24th, 2016, 01:56 PM
PuX PuX is offline
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
  #3 (permalink)  
Old February 24th, 2016, 02:37 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 03:47 AM
ADODB.Connection user-defined type not defined Wall st Guru Excel VBA 2 March 26th, 2014 04:44 PM
DataRowView Type Not Defined (CH 14) kmwilliams5 ASP.NET 3.5 Basics 5 April 25th, 2009 06: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 05: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



All times are GMT -4. The time now is 12:56 AM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.