Today I will show you normal popup VS spModal popup
1. spModal alert-
HTML:
<button ng-click="c.onAlert()" class="btn btn-default">Alert</button>
Client Script:
spModal.alert('How do you feel today?').then(function (answer) { c.simple = answer; });
2. spModal Confirm –
spModal.confirm("Can you confirm or deny this?").then(function(confirmed) { c.confirmed = confirmed; // true or false })
3. spModal Open –
spModal.open({ title: 'Give me a name', message: 'What would you like to name it?', input: true, value: c.name }).then(function(name) { c.name = name; })
4. spModal open widget –
spModal.open({ title: 'Displaying widget ', widget: 'widget-form', widgetInput: {sys_id:sysId ,table: c.options.tableName} }).then(function(){ console.log('widget dismissed'); });
5. spModal with more options:
var options = { title: i18n.getMessage("Test"), headerStyle: { border: 'none' }, footerStyle: { border: 'none' }, message: "<p>Hello</p>", buttons: [{ label: i18n.getMessage("Cancel"), value: "cancel", "class": "cancel" }, { label: i18n.getMessage("Ok"), primary: true, value: "ok", "class": "ok" }] }; spModal.open(options).then(function(confirm) { if (confirm.value == "ok") { // take action } });
One response
Hi, I am having difficulties with this and could use some tutoring, would you happen to have a way for me to contact you and I am willing to pay you for your time. A little bit of background on my side, I am an associate-level NOW developer out of VA, USA. Thanks