NoctisHsu
3/21/2016 - 8:35 AM

How dose non-angular iframe page to change parent scope data without digest

How dose non-angular iframe page to change parent scope data without digest

                this.addCartCount = function () {
                    if (window["angular"]) {
                        var controllerScope = window["angular"].element(document.querySelector('.layout-header')).inheritedData();
                        controllerScope.$ngControllerController.ShoppingCartCount = controllerScope.$ngControllerController.ShoppingCartCount + 1;
                    }
                };
                    this.selectedSku().SaleProductSKUId(),
                    this.selectedQty())
                    .done(() => {
                        if(window.parent["model"]){
                            window.parent["model"].addCartCount();
                        }
                        var product:UniversalAnalyticsEcommerceEnhance.IEcommerceProductData = {
                            id: this.item.Id(),
                            name: '('+this.item.Id()+')'+this.item.Title(),