Initiate router.back()

How can get a reference to a view (or something else) inside a click handler (UpdateEVPlace) so I can call back() in the end of the handler?


<div class="page-content">
  <div class="block block-strong">
    {{#each sequence}}
    <p class="row">
      <a href="#" class="col button button-large button-raised button-fill" @click="UpdateEVPlace({{this}})">{{this}}</a>
export default {
methods: {
  UpdateEVPlace: function (n) {
    var self = this;

I also wanted to know if there’s a simple way of accessing global variables - those aren’t visible in my code. So, it’s tiresome to refer them as self.$ every time I need them in templates.

This will do what you need:


You can use global vars in JS like in any other JS files, e.g. window.something = 'foo'