Skip to content

Script problem after update #325

Discussion options

You must be logged in to vote

I forgot to mention this change, sorry. It's caused by define|require function refactoring.

You need to explicitly require dependency now (like in Luma). Here is how it should work:

$(document).on('breeze:load', function () {
  require(['Magento_Ui/js/modal/alert'], function (alert) {
    alert({ 
      title: $t('Title'), 
      content: $t('Content') 
    }); 
  });
});

p.s. I updated the code example to match your use-case.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by techweb-digimedia
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants