title: Angular.js features inside Node.js app
body: <p>I have a node.js app which has been developed over a few weeks time. I want to add certain features like infinite-scroll for which the packages in node.js require angular.js as well. So, I thought that I would go ahead and add angular.js support as well, so that that one page(and others  which need such support) can be served through angular.js pages.</p>
  
  <p>Going through the basic examples available over the Internet, I created a listAll.jade file(as I use express-jade) in the /views directory. Here is how it looks like:</p>
  
  <pre><code>    html(ng-app='demoapp')
    head
      title List All Entries!
      link(href='//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css', rel='stylesheet')
      script(src='http://ajax.googleapis.com/ajax/libs/angularjs/1.3.10/angular.min.js')
      script(src='js/listAllEntries.js')
    body(ng-controller='GetAllEntries')
      div(ng-repeat='post in posts')
        | {{post}}
  </code></pre>
  
  <p>And then inside /public/js directory, I added a listAllEntries.js file, Here are the its contents:</p>
  
  <pre><code>var express = require('express');
  var angular = require("angular");
  var app = angular.module('geniuses', []);
  
  app.controller('GetAllGeniuses', [
  '$scope',
  function($scope){
   // $scope.test = 'Hello world!';
   console.log("Here?...")
   $scope.posts = [
    'post 1',
    'post 2',
    'post 3',
    'post 4',
    'post 5'
  ];
  }]);
  </code></pre>
  
  <p>And lastly, to wire them together, in the index.js file(I have renamed app.js to index.js) I did this:</p>
  
  <pre><code>app.use(express.static(__dirname + '/public'));
  app.use('/listAllEntries',function(req, res){
      res.render('listAllEntries', {});
  });
  </code></pre>
  
  <p>But, when I hit <a href="http://localhost:3001/listAllEntries" rel="nofollow">http://localhost:3001/listAllEntries</a>, all I get is {post}} on the browser. The console.log statement added in the .js file doesn't get printed so I am assuming that the js file isn't being loaded.</p>
  
  <p>I have looked at almost all the options and queries but couldn't really resolve this.</p>