app/demo/events/actions/loads.pom
Voom::Presenters.define(:loads_action) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
attach :events_drawer
indented_grid do
heading 'Loads'
body 'Loads a new presenter, replacing the whole page.'
content do
subheading "#{context['reloaded'] ? "Reloaded" : 'Loads'} another presenter"
button 'loads this page' do
event :click do
loads :loads_action, reloaded: true, nil_value:nil
end
end
heading context['reloaded'] ? "Reloaded" : 'Loaded'
end
content do
subheading "An absolute URL loads another page"
button 'loads google.com' do
event :click do
loads 'https://google.com'
end
end
end
end
attach :code, file: __FILE__
end