Question: I tried to use scope instead of ng-init in my angularjs code below but nothing renders why ?

```
   <!doctype html>
    <html ng-app="myApp" ng-controller="myCtrl">
    <head>
    <title>Bookshop - Your Online Bookshop</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="http://www.w3schools.com/lib/w3.css">
    </head>
    <body>

    <div class="container">
            <h2>Your Online Bookshop</h2>
            <ul class="unstyled">
                    <li ng-repeat="book in books">
                    {{book}}
                    </li>
    </ul>
    </div>

    <div class="container">
            <h2>Your Online Bookshop</h2>
            <ul class="unstyled">
                    <li ng-repeat="book in books_author">
                            <span>{{book.name}} written by {{book.author}}</span>
                    </li>
            </ul>
    </div>

    <script>
    var app = angular.module('myApp', []);
    app.controller('myCtrl', function($scope) {
    $scope.books = ['Effective Java','Year without Pants','Confessions of public speaker','JavaScript Good Parts'];
    $scope.books_author = [{'name': 'Effective Java', 'author':'Joshua Bloch'},{'name': 'Year without Pants', 'author':'Scott Berkun'},{ 'name':'Confessions of public speaker','author':'Scott Berkun'},{'name':'JavaScript Good Parts','author':'Douglas Crockford'}];
    });
    </script>    
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>
    </body>
    </html>

```

Answer: 
Ok after some experimentation and by pure accident, I found out that **The console.log apparently clears the flash!!!!**

I hope this helps anyone who runs into this issue.
I know you already found a solution, but for anybody with the same issue, what the problem actually is is that when you use `req.flash()` to retrieve the flash messages, it actually **deletes** that message after retrieving it.

Had you done this:

```
console.log(req.flash('message'));
console.log(req.flash('message'));

```

You would have received something similar to this output:

```
[ 'TEST' ] 
[]

```

This is because the first call to `req.flash('message')` retrieves **and**
deletes the given message.

Additionally, had you done this:

```
req.flash('message');
console.log(req.flash('message'));
console.log(req.flash('message'));

```

You would have received output that was similar to this:

```
[]
[]

```