Advertisement
Guest User

Untitled

a guest
Apr 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. router.get('*', function(req, res) {
  2. res.render('./index');
  3. });
  4.  
  5. router.get('/test', function(req, res) {
  6. res.json({go : 'Welcome to the test page.'});
  7. });
  8.  
  9. Object { data: "<!DOCTYPE html> <html lang="en" ng-…", status: 200, headers: wd/<(), config: Object, statusText: "OK" }
  10.  
  11. router.get('/', function(req, res) {
  12. res.render('./index');
  13. });
  14.  
  15. router.get('/test', function(req, res) {
  16. res.json({go : 'Welcome to the test page.'});
  17. });
  18.  
  19. Object { data: "test", status: 200, headers: wd/<(), config: Object, statusText: "OK" }
  20.  
  21. my.test = function() {
  22. $http.get('/test')
  23. .then(handleSuccess)
  24. .catch(handleError);
  25.  
  26. function handleSuccess(response) {
  27. console.log(response);
  28. }
  29. function handleError(error) {
  30. console.log(error);
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement