javascriptjqueryajaxmithril.jsalertify

alertify.alert doesnt work in mithril (m.request) response


i am working on a project where i am using mithril.js and also using alertify.js in the response i want to alert some data it doesnt work and if the same alert i am using before m.request it works fine

        function send_data()
        {        
         m.request({
            method: "GET",
            url: url_root,
            config: xhrConfig
        }).then(
            function(response) {
             alertify.alert("test");
          });
     }
send_data();

Solution

  • Copying and pasting from the answer I gave you on the Github issue you raised for Mithril:

    Works for me using alertify 3.11. v0.5rc1 can't even execute without breaking ('alertify is undefined'). What problem are you facing?