Error when create Main App Component

i create app
var app = new Framework7({ componentUrl: 'app.html' ....
then create view
var mainView = app.views.create(".view-main", {});

app.html:
<div id="app"> <div class="view view-main"> <div data-name="home" class="page"> </div> </div> </div>
and get errors:
Uncaught Error: Framework7: can't create a View instance because the selector ".view-main" didn't match any element at new t (framework7-bundle.min.js:13) at Array.create (framework7-bundle.min.js:13) at scripts.js:60

`Uncaught (in promise) Error: ReferenceError: $render is not defined
at framework7-bundle.min.js:13`

I do not use webpack

Would be good to see more complete code example on where do you write this code