Stack Exchange
Simple angular app does not load when using jade templating
Trying to make angular work, but nothing happens. I am currently using node.js as server, express as framework and jade as templating.
This is my layout file:
doctype html
html(ng-app="myApp")
    head
        meta(charset="utf-8")
        link(rel="stylesheet", href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css")
        link(rel="stylesheet", href="css/stylesheet.css")
        title About

    body
        include navbar.jade
        .wrapper
            block content
        .push
        include footer.jade

    script(type="text/javascript", href="https://code.jquery.com/jquery-2.2.0.min.js")
    script(type="text/javascript", href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.j")
    script(type="text/javascript", href="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js")
    script(type="text/javascript", href="//ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular-route.js")
    script(type="text/javascript", href="js/app.js")
    script(type="text/javascript", href="js/controllers/mainController.js")

This is the index.jade file where I am trying to use angular ng-model
extends ../layout
block content
    .container(ng-controller="mainController")
        h1 Head
        | {{message}}
        input(type='text', data-ng-model='name')
        | {{name}}

app.js:
var myApp = angular.module('myApp', []);

myApp.controller('', function($scope) {

     $scope.message = 'Hi mom';

});

at node server I have defined views and static files like this:
app.set('views', __dirname + '/views');
app.use(express.static(__dirname + '/public'));

File structure
server.js

public
----css
----etc
----js
-------app.js

views
---layout.jade
---footer.jade
---navbar.jade
---partials
------page1.jade
------page2.jade


Any errors in developer console?

Your myApp controller declaration needs to match what you have specified in ng-controller. Currently you have it empty

ng-controller="mainController"

myApp.controller('mainController', function ($scope) { ... });


Tried that. Shouldn't ng-model work independently. It seems like angular is not loading at all. No error in console too.
