[SOLVED] Framework 7 gives Cannot read property 'dialog' of undefined for app.dialog

I am new to framework 7, have read the docs but can not make same dialogs as described in the docs. I can only run below code with window alert dialog

I am using framework 7 on top of vue and cant use some examples in my code, especially with app and Dom7, can somebody help me on them ?

f7-button.this-is-why-i-use-f7-components-and-not-f7vuecomponents-f7vuecomponents-are-created-AFTER-render(fill='', raised='',onclick="{alert('Demo', 'Mobile Office')}") About`

I tried both these in my component method but did not worked, I get error -> “Cannot read property ‘dialog’ of undefined”

  this.$f7.dialog.alert('Version 4.0', 'Mobile Office', false)

  this.$f7.dialog.create('Version 4.0', 'Mobile Office')

As I understand, this.f7 refers to myApp in examples found in framework 7 docs
Normaly this.$f7 works for other things such as this.$f7.store etc.

and when I debug I see this.$f7 object and it has dialog object, but somehow I get undefined on the console.


Its working for me without problem with the code you sahred.

1 Like

I dont know but it works now in another pc