angular2 observable, getting undefined in component
<p>I am new on angular2, I need some help.
I am using below service class.</p>

<pre><code>import {Injectable} from 'angular2/core';
import {Http} from 'angular2/http';
import 'rxjs/add/operator/map';

@Injectable()
 export class UsersService {
    private _url = "http://jsonplaceholder.typicode.com/users";

    constructor(private _http: Http){
    }

    getUsers(){
        return this._http.get(this._url)
            .map(res =&gt; res.json());
    }
 }
</code></pre>

<p>when I am calling above service in below component, I get undefined value.</p>

<pre><code>import{Component, OnInit} from 'angular2/core';
import{UsersService} from './users.service';

@Component({
    selector: 'users',
    template:'In users',
    //templateUrl: 'app/users.component.html',
    providers: [UsersService] 
})

export class UsersComponent implements OnInit{
users: any[];

    constructor(private _service: UsersService){
    }

    ngOnInit(){
        this._service.getUsers()
            .subscribe(result =&gt; this.users = result);

        console.log(this.users);
    } 
}
</code></pre>

<p>But if I tried to log the value in the console in service class, its shows there. any help would be highly appreciable.
Thanks</p>