Hi,
I’m getting an error when I try and use the modal option from the interface api
When I use the example provided:
function openModal(){
try {
// app.js
client.interface.trigger("showModal", {
title: "Sample Modal",
template: "modal.html"
});
} catch (error) {
// failure operation
console.error(error);
}
}
I get:
I use the following on click method to try and call the modal function:
<fw-button onclick="openModal()">Open Modal</fw-button>
Here is the modal.html
<html>
<head>
<script src="https://static.freshdev.io/fdk/2.0/assets/fresh_client.js"></script>
<script src="../app/scripts/app.js"></script>
</head>
<body>
<fw-modal id="open-modal" slier="true">
<fw-modal-title><span>Example modal</span></fw-modal-title>
<fw-modal-content>
<div>Content</div>
</fw-modal-content>
<fw-modal-footer>
<fw-button>OK</fw-button>
</fw-modal-footer>
</fw-modal>
</body>
</html>