Install Framework7 in Meteor


#1

Hi. I tried to install Framework7 from this package: https://atmospherejs.com/nobutakaoshiro/framework7-ios-material but i can’t. Can you help me, please?

client/main.js

Meteor.startup(() => {
  if (Meteor.isClient) {
    // Initialize app
    var myApp = new Framework7();
    // If we need to use custom DOM library, let's save it to $$ variable:
    var $$ = Dom7;
  }
  // ReactDOM.render(routes, document.querySelector('.the-container'));
})

client/main.html

<head>
  <!-- Required meta tags -->
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <!-- Your app title -->
  <title>Frame7 Test</title>
  <!-- Material(Android) theme styles -->
  <link rel="stylesheet" href="/packages/nobutakaoshiro_framework7-ios-material/framework7/dist/css/framework7.material.min.css">
  <link rel="stylesheet" href="/packages/nobutakaoshiro_framework7-ios-material/framework7/dist/css/framework7.material.colors.min.css">
</head>
<body>
  <h1>Hello world</h1>
  <div class="the-container"></div>
</body>

But i receive an error in the console.

Thanks


#2

you need to add your initialize codes as a script within your layout.js file.