Returns json data about a single user.
- 
URL /users/:id 
- 
Method: 
| //What will be the output of the following code: | |
| var myObject = { | |
| foo: "bar", | |
| func: function() { | |
| var self = this; | |
| console.log("outer func: this.foo = " + this.foo); | |
| console.log("outer func: self.foo = " + self.foo); | |
| (function() { | |
| console.log("inner func: this.foo = " + this.foo); | |
| console.log("inner func: self.foo = " + self.foo); | 
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body ng-app="demo" > | |
| <script src="https://rawgit.com/angular/bower-angular/master/angular.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/chart.js/latest/Chart.min.js"></script> | 
| var connect = require('connect'); | |
| var serveStatic = require('serve-static'); | |
| connect().use(serveStatic(__dirname)).listen(8080) | 
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <style> | |
| #div1 { | |
| width: 350px; | |
| height: 370px; | |
| padding: 10px; | |
| border: 1px solid #aaaaaa; | |
| } | 
| <ul><li class="canvas">canvas</li><li class="cookies">cookies</li><li class="customelements">customelements</li><li class="setclasses">setclasses</li></ul> | 
| export class MyApp { | |
| constructor(private platform : Platform) { | |
| this.platform.Ready().then(() => | |
| this.handleEvents(); | |
| ) | |
| } | |
| handleEvents() { | |
| this.events.subscribe("navigation", (eventData)=> { | |
| this.nav.push(eventData.page, eventData.data) | |
| }); | 
| <html lang = "en"> | |
| <head> | |
| <link rel = "stylesheet" | |
| href = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css"> | |
| <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script> | |
| <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script> | |
| <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script> | |
| <script src = "https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script> | |
| <script src = "https://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script> | |
| <script language = "javascript"> |