Sunday, 23 March 2014

node js 5


1 get value from post:  req.body.name

2 get value from get like this:
app.get('/users/:username', function(req, res){
User.get(req.params.username, function(err, user) {
res.json(user);
});

});





3 How to call jquery function or other javascript function from AngularJS function:
Just all the function name as usual:

updateUser(user.name,user.email);



4 How to call a AngularJS function from jquery or other js function:

You can see a working example here:
I also showed this in a slideshow for the Ottawa AngularJS group (just skip to the last 2 slides)

5 undefine and null
http://www.jotform.org/javascript-codes/javascript-check-undefined-or-null-or-empty/
6 exception?  I got a error,
db.js
throw new Error("db object already connecting, open cannot be called multiple times");




No comments:

Post a comment