角度完全加载时回调

时间:2018-10-09 05:52:37

标签: jquery angular

我必须知道脚本何时完全加载。我已经尝试了一些jQuery“在网站上加载”,但是这不起作用,角度异步加载,这是我的问题。知道如何知道角度准备好了吗?

页面已上传到: https://test2.iform.com.pl/imos-p.html

代码:

 <!DOCTYPE html>
 <html style="height:100%;">
    <head>
        <title>TODO supply a title</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <style type="text/css">
            #ng-app, #ng-app > div, .main-content {height:100%;}
        </style>
        <script type="text/javascript">             
        var imosNetData = Object.assign({
            apiKey: '4ewrt6789io',
            session: 'session123',
              mode: 'catalog',
              catalog: '2168_1',
              showBasketButton: false,
             showPriceButton: false,
            onBasketButtonEnabled: function(isEnabled) {
                console && console.log('onBasketButtonEnabled(): ', isEnabled);
            },
            onBeforeAddArticle: function(article, pVarString) {
                console && console.log('onBeforeAddArticle(): article: ', article);
                console && console.log('onBeforeAddArticle(): pVarString: ', pVarString);
                return true;
            },
            onAddArticle: function(status, data) {
                console && console.log('onAddArticle(): status: ', status);
                console && console.log('onAddArticle(): data: ', data);
            },
            onBeforeCalculatePrice: function() {
                console && console.log('onBeforeCalculatePrice()');
            },
            onCalculatePrice: function(price) {
                console && console.log('onCalculatePrice(): ', price);
            }     

        });
        </script>
    </head>
    <body style="height: 100%; padding: 60 60 60 60; overflow:scroll;">
        <div style="height: 100%;">
            <script src="https://2168.netshop.imos3d.com/app/loader.js"></script>
        </div>
    </body>
 </html>

0 个答案:

没有答案