valnub/Framework7-Plugin-Welcomescreen

myApp.welcomescreen is not a function

MarioVanDenEijnde opened this issue · 1 comments

Hello Welcomescreen team,

I referenced:

<link rel="stylesheet" href="welcomescreen.css">
<script src="welcomescreen.js"></script>

Added below code to my-app.js but get this message: myApp.welcomescreen is not a function
Please advise.

var myApp = new Framework7({
    animateNavBackIcon:true,
    //panelsCloseByOutside: false,
    precompileTemplates: true
    //uniqueHistory: true
});

var options = {
  'bgcolor': '#0da6ec',
  'fontcolor': '#fff'
}
var welcomescreen_slides = [
{
  id: 'slide0',
  picture: '<div class="tutorialicon">☆</div>',
  text: 'Thanks for reading! Enjoy this app.<br><br><a class="tutorial-close-btn" href="#">End Tutorial</a>'
}
];
var welcomescreen = myApp.welcomescreen(welcomescreen_slides, options);

Kind regards,
Mario

Sorry my mistake. It was the order of loading the script files.
welcomescreen.js should be loaded before the my-app.js

Kind regards,
Mario