Experiences with Vue inside F3

480 views
Skip to first unread message

Yoeri Nijs

unread,
May 8, 2018, 3:46:49 PM5/8/18
to Fat-Free Framework
Hi all,

Currently, I am working on integrating Vue inside my project. In my case, I noticed that the Vue syntax might cause a conflict with the Fatfree template engine. For instance, Vue works with the curly brackets as well in order to present a variable to the user. Does anyone have worked with Vue inside a F3 project earlier? I am just curious to other experiences.

Best!

ikkez

unread,
May 9, 2018, 5:31:29 AM5/9/18
to Fat-Free Framework
that's no problem.. you can write {-{{ myVariable }}-} to make the template engine ignore this expression.

Bellegueulle Damien

unread,
May 9, 2018, 10:39:06 AM5/9/18
to Fat-Free Framework
Or change delimiter like this :

    new Vue({     
      el: '.time',
      delimiters: ['{%', '%}'],
      data: {
        heurenow: '',
        datenow: ''
      },
      methods: {
        time() {
          var self = this;
          this.heurenow = moment().format('HH:mm');
          this.datenow = moment().format('dddd Do MMMM YYYY');
          setInterval(self.time, 10000);
        },
      },
      mounted: function() {
        this.time()
      }
    });
Reply all
Reply to author
Forward
0 new messages