[SOLVED]How to get current view history?

How do I get the history, name etc of the current view?
Im trying to get the below to work.
It is inside my page init.

var view = app.views.current();
console.log (app.view.name)
if (!view) return;
if (view.history.length > 1) {

And I get this error.

TypeError: app.views.current is not a function. (In ‘app.views.current()’, ‘app.views.current’ is an instance of View)

Ok, so this works.

var view = app.views.current;
console.log (app.view.name)

There was an issue in docs, it is not a function, must be just app.views.current

Ok, thanks Vladimir, now it works.