These are chat archives for angular/angular.js

11th
Jul 2018
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:34
have anyone tried linkedin rest api using angularjs, please help me I have stuckked in middle to get authorization code
Frederik Prijck
@frederikprijck
Jul 11 11:35
@bbbqube_twitter What have you tried so far ?
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:35
I have calling their endpoints to get authorization code using $http
Frederik Prijck
@frederikprijck
Jul 11 11:36
did you manage to call the endpoints using something like postman ?
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:36
@frederikprijck https://developer.linkedin.com/docs/oauth2 this is the doc link
Frederik Prijck
@frederikprijck
Jul 11 11:36
I'm not going to dig into the linkedin api docs
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:37
@frederikprijck yes I able to do that
Frederik Prijck
@frederikprijck
Jul 11 11:37
Okay, so what's different between the request made in postman and the one made using $http ?
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:38
I'm using insomnia, i pass form url encoded data
Frederik Prijck
@frederikprijck
Jul 11 11:39
What's insomnia ?
Tip: You can copy the request using curl and import it in postman to inspect differences.
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:39
okay now I get something
when I pass data in json format it not going well
Frederik Prijck
@frederikprijck
Jul 11 11:40
You should compare the differences between the succesful request and failign request (probably difference in headers)
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:40
but how do I call $http request using form url encoded data
yes header have to be passed this one, application/x-www-form-urlencoded
it is mentioned on thier doc
Ghost
@ghost~5b211ec2d73408ce4f9d352b
Jul 11 11:45
thanks @frederikprijck for the link, I hope it can make a solution
Joey Rivera
@joey7040
Jul 11 13:52
@kjvelarde thank you I had figured it out yesterday!
Matt Erman
@CodeLiftSleep
Jul 11 14:02
Having an issue with $q.all and promise array but i dont understand why...it should be working based on the documentation for it
I have potentially 3 I need to save. The 3rd one needs to wait for the first 2 if they are there. So for instance I have the following:
recProm = user.saveData(....).then(function(response))...
stdProm=user.saveData(...).then(function(response))...
Then I run a check to see if either of those are not null and add them to a promise array and then $q.all(promise_array).then(function(response))...
Matt Erman
@CodeLiftSleep
Jul 11 14:07
It shows the proper promises in the array but it just somehow ends before they rsolve and redirects to the main page...I am not understanding why this is happening
Matt Erman
@CodeLiftSleep
Jul 11 14:17
Any help guys?
Syed Muhammad Ali Gardezi
@Gardezi1
Jul 11 14:24
Hi guys, Anyone online? I need help with something
Joey Rivera
@joey7040
Jul 11 15:19
does anyone know of a compare directive?
i thought ng-compare was a thing
Frederik Prijck
@frederikprijck
Jul 11 16:13
Nope @joey7040, but I guess that's easy to implement depending on what it is exactly that u need...
@CodeLiftSleep mind to show more code?
Hard to tell by the snippets u added above.
Joey Rivera
@joey7040
Jul 11 17:08
yea it doesn't exist so I just wrote in a little JS and made my own directive
BetaProg
@BetaProg
Jul 11 17:44
Hi, newbie here.. can some one explain what config(), run() stands for in angular js? or route me to a well explained link or tutorial?
Frederik Prijck
@frederikprijck
Jul 11 18:00
Config is a function that gets executed during configuration of angularjs, run is executed a bit later when the app is running, prior to all the other code (directives, controllers,...)
You cant inject services and values into config, but u can inject them in run.
Config is mostly used to configure providers, whose configuration will be used when initializing the service related to that provider ($get method)
Matt Erman
@CodeLiftSleep
Jul 11 19:15
Is it possible to use jasmine/karma effectively without node.is?
Brad
@bradtaniguchi
Jul 11 21:57
@CodeLiftSleep What do you mean? How would you run jasmine/karma without nodejs?