angular.js:13550 TypeError: Cannot set property 'people' of undefined
<p>I am learning angular+ES6 to code.</p>

<p><code>test.controller.js</code></p>

<pre><code>class TestSecIndexController {

    constructor (TestSecService,$q) {
        this.src = require('./../images/2.jpg');
        this._TestSecService = TestSecService;
        let promises = [
            this.getPeopleList()
        ];    
        $q.all(promises).then(function (){
            console.log(this.people);
        })  
    }    
    getPeopleList(){
        return this._TestSecService.getPeopleList().then(function(res){
            this.people = res.data; //line: 22
        });
    }

    static testSecIndexController(TestSecService,$q){
        return new TestSecIndexController(TestSecService,$q);
    }    
}    

TestSecIndexController.testSecIndexController.$inject = ['TestSecService','$q'];    
export default angular.module ('test2.index.controller', [])
    .controller ('testSecIndexController', TestSecIndexController.testSecIndexController)
</code></pre>

<p>If do this, there has an error :</p>

<blockquote>
  <p>angular.js:13550 TypeError: Cannot set property 'people' of undefined 
      at index.controller.js:22</p>
</blockquote>

<p><code>this.src</code> can set successfully,why <code>this.people</code> can not?</p>