Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 27 2017 02:46
    davedub opened #19
  • Dec 27 2017 02:46
    davedub opened #19
  • Dec 27 2017 02:43
    davedub edited #6
  • Dec 27 2017 02:43
    davedub edited #6
  • Dec 27 2017 02:40
    davedub closed #6
  • Dec 27 2017 02:40
    davedub closed #6
  • Dec 27 2017 02:38
    davedub opened #6
  • Dec 27 2017 02:38
    davedub opened #6
  • Mar 25 2015 16:20

    brookr on master

    (markup) wrap code spans w/ bac… Merge pull request #16 from fra… (compare)

  • Mar 25 2015 16:20

    brookr on master

    (markup) wrap code spans w/ bac… Merge pull request #16 from fra… (compare)

  • Mar 25 2015 16:20
    brookr closed #16
  • Mar 25 2015 16:20
    brookr closed #16
  • Mar 25 2015 16:20
    brookr commented #16
  • Mar 25 2015 16:20
    brookr commented #16
  • Mar 25 2015 16:18
    brookr commented #17
  • Mar 25 2015 16:18
    brookr commented #17
  • Mar 25 2015 16:18

    brookr on master

    (markup) improve superagent mar… Merge pull request #17 from fra… (compare)

  • Mar 25 2015 16:18

    brookr on master

    (markup) improve superagent mar… Merge pull request #17 from fra… (compare)

  • Mar 25 2015 16:18
    brookr closed #17
  • Mar 25 2015 16:18
    brookr closed #17
Robert Talamantez
@Talamantez
yes that's the problem i'm having
the console.dir prints out this:
{ locations: 
   [ { name: 'Portland',
       forecastUrl: 'http://www.wunderground.com/US/OR/Portland.html',
       iconUrl: 'http://icons-ak.wxug.com/i/c/k/cloudy.gif',
       weather: 'Overcast',
       temp: '54.1 F (12.3 C)' },
     { name: 'Bend',
       forecastUrl: 'http://www.wunderground.com/US/OR/Bend.html',
       iconUrl: 'http://icons-ak.wxug.com/i/c/k/partlycloudy.gif',
       weather: 'Partly cloudy',
       temp: '55.0 F (12.8 C)' },
     { name: 'Manzanita',
       forecastUrl: 'http://www.wunderground.com/US/OR/Manzanita.html',
       iconUrl: 'http://icons-ak.wxug.com/i/c/k/rain.gif',
       weather: 'Light Rain',
       temp: '55.0 F (12.8 C)' } ] }
Dale Corns
@dcorns
have your tried this.name instead of just name? As I understand it, that is the way it is done.
Robert Talamantez
@Talamantez
I will try that
hmm, yeah - I also tried just getting it to print anything based on the partials.weather.locations count, and that wouldn't come in either
so it looks like it's not seeing "par.wea.loc"
no success with 'this.name'
Dale Corns
@dcorns
Yes forgive my handlebars ignorance, but you assigning the locations object array to res.locals.partials.weather and console logging the same, but...
Robert Talamantez
@Talamantez
yeah - i addt ed a script in weather.handlebars to console.log 'partials' on the client - it says it's undefined
Dale Corns
@dcorns
is res.locals a global
how about res.locals.partials.weather.locations ?
Robert Talamantez
@Talamantez
yes it's looks like those are globals
Dale Corns
@dcorns
if they are, rather than writing a script you should be able to see res.locals try to auto complete when you start to type it in the console on the client side
Robert Talamantez
@Talamantez
yeah that's not coming up in the console
hmmm, yeah so the response object in the app goes back to through the handlebars template before it's rendered
Dale Corns
@dcorns
Probably not exactly, handlebars is all client side, I would think you would need some sort of a controller that is responsible for loading the template on the client side.
what is it that receives the response from the server success:
app.use is on the server side right?
Robert Talamantez
@Talamantez
ya app.use is on the server
Dale Corns
@dcorns
so you are making a get request with a callback for err or datareturned right?
Robert Talamantez
@Talamantez
I guess that's how it works - the handlebars template looks for a partials.weather object
the server sets res.locals.partials.weather to getWeatherData()
so all of this happens on the server side before it's sent to the browser i think
ooooooo, i'm using express 4 with the express 3 handlebars
(let me sort that out)
Dale Corns
@dcorns
This is an angular call $http.put('api/v_0_0_1/users/' + user._id, user)
.success(function(data) {
$scope.getAllUsers();
})
Robert Talamantez
@Talamantez
maybe i should just switch to angular right now :-D
Dale Corns
@dcorns
it is an http.put but the same kind of thing would hold for a get
no I dont think so
are you just using express without a framework?
I like that better, hold on a sec
Robert Talamantez
@Talamantez
ya -trying a pared-down method
node, express, hbs
Dale Corns
@dcorns
Let me take a quick look at my raw express code...Its a restful architecture right?
Robert Talamantez
@Talamantez
ya
Dale Corns
@dcorns
Sorry dude, but I slept for a half hour last night and I'm running a little slow, and have so many projects in my dir that I cant find the example I was looking for. What is the script you have running on the client side?
Robert Talamantez
@Talamantez
hey man, it's cool - let me sort out this dependency issue - I'll set up a repo and link you when i've got it sorted out
thanks again man
Dale Corns
@dcorns
ok, I dont think it is the template, more than likely it is the restful that is the issue. You should at least be getting the res object back. Take a look at the network part of dev tools and do a refresh, that may help also.
Robert Talamantez
@Talamantez
ok cool
Dale Corns
@dcorns
good chating with you, Im sure you will figure it out.
Robert Talamantez
@Talamantez
thanks man - good to chat too - i'm sure i'll be back about it lol
Hailey L. Petway
@hlpetway
IMG_2805.JPG
Happy Halloween!
Jeff Adelman
@jeffadelman8
Hey @SwampGuzzler, miss your mug around CF bro. It's not the same without you hiding out in the phone booth!
Hailey L. Petway
@hlpetway
Want to take a challenging JS Quiz? http://perfectionkills.com/javascript-quiz/
Jeff Adelman
@jeffadelman8
@hlpetway I'd rather not admit how poorly I did on that.
Hailey L. Petway
@hlpetway
It's supposed to be really challenging and obscure. Checkout the comments, they made me feel better. :balloon:
Flycastmedia
@SEOforlondon_twitter