How to use the framework7 function in framework7

To help you get started, we’ve selected a few framework7 examples, based on popular ways it is used in public projects.

github GuillaumeBiton / HackerNews7 / src / js / app.js View on Github external
'</div>' +
      '{{#if comments}}{{> "comments"}}{{/if}}' +
  '{{/each}}'
);

// Import F7 Styles
import 'framework7/css/framework7.bundle.css';

// Import Icons and App Custom Styles
import '../css/icons.css';
import '../css/app.css';

// Import Routes
import routes from './routes.js';

var app = new Framework7({
  root: '#app', // App root element

  name: 'hackernews7', // App name
  theme: 'auto', // Automatic theme detection
  // App root data
  data() {
    return {
        apiUrl: "https://api.hnpwa.com/v0/",
        api: null
    }
  },
  // App root methods
  methods: {
    fetchAPI() {
      var self = this;
      self.request.json(self.data.apiUrl, (api) => {
github gaynetdinov / ex_money / assets / js / app.js View on Github external
exMoney.alert(data.title, data.msg, function () {
      localStorage.setItem("interactive", JSON.stringify({status: false}));
      mainView.router.back({
        url: '/m/accounts/' + account_id,
        ignoreCache: true,
        force: true
      });
    });
  });

  channel.on("transactions_fetched", function(msg) {
    exMoney.addNotification({title: msg.title, message: msg.message});
  });
}

var exMoney = new Framework7({
  root: '#app',
  modalTitle: 'ExMoney',
  id: 'com.exmoney',
  theme: 'ios',
  //statusbar: { iosOverlaysWebview: true },
  touch: { tapHold: true },
  panel: { swipe: 'left' },
  routes: [
    {
      name: 'start-screen',
      path: '/m',
      url: '/m',
      on: {
        pageInit: function (e, page) {
          var router = this;