Tweeted twitter.com/StackWebmasters/status/1072823519384350720
2 edited title, spelling, remove code formatting on name
source | link

No result by adding dynamically json Google Search Console does ot recognize JSON-ldLD dynamically added to head in angular app

In my Angular(v1) application, I have a directive that on routeChanging event, remove last added jsonJSON-ldsLDs and add jsonJSON-ldLD of that page to head element.

// .. some codes here

angular.element('.removableJsonLd').remove();

// ... some codes here

var html = angular.element('<script class="removableJsonLd" type="application/ld+json">' + JSON.stringify(json, 0, 2) + '</script>');
$timeout(function () {
    angular.element('head').append(html)
    scope.$applyAsync(function () {
        $compile(html)(scope);
    });
}, 200);

When I check Google Structured Data Testing Toolthe Google Structured Data Testing Tool it show me 3 item. You can check data live [HERE].
But Google shows me nothing after 3 weeks in my WemasterToolsWebmaster Tools.

enter image description here

No result by adding dynamically json-ld to head in angular app

In my Angular(v1) application, I have a directive that on routeChanging event, remove last added json-lds and add json-ld of that page to head element.

// .. some codes here

angular.element('.removableJsonLd').remove();

// ... some codes here

var html = angular.element('<script class="removableJsonLd" type="application/ld+json">' + JSON.stringify(json, 0, 2) + '</script>');
$timeout(function () {
    angular.element('head').append(html)
    scope.$applyAsync(function () {
        $compile(html)(scope);
    });
}, 200);

When I check Google Structured Data Testing Tool it show me 3 item. You can check data live [HERE].
But Google shows me nothing after 3 weeks in my WemasterTools.

enter image description here

Google Search Console does ot recognize JSON-LD dynamically added to head in angular app

In my Angular(v1) application, I have a directive that on routeChanging event, remove last added JSON-LDs and add JSON-LD of that page to head element.

// .. some codes here

angular.element('.removableJsonLd').remove();

// ... some codes here

var html = angular.element('<script class="removableJsonLd" type="application/ld+json">' + JSON.stringify(json, 0, 2) + '</script>');
$timeout(function () {
    angular.element('head').append(html)
    scope.$applyAsync(function () {
        $compile(html)(scope);
    });
}, 200);

When I check the Google Structured Data Testing Tool it show me 3 item. You can check data live [HERE].
But Google shows me nothing after 3 weeks in my Webmaster Tools.

enter image description here

1
source | link

No result by adding dynamically json-ld to head in angular app

In my Angular(v1) application, I have a directive that on routeChanging event, remove last added json-lds and add json-ld of that page to head element.

// .. some codes here

angular.element('.removableJsonLd').remove();

// ... some codes here

var html = angular.element('<script class="removableJsonLd" type="application/ld+json">' + JSON.stringify(json, 0, 2) + '</script>');
$timeout(function () {
    angular.element('head').append(html)
    scope.$applyAsync(function () {
        $compile(html)(scope);
    });
}, 200);

When I check Google Structured Data Testing Tool it show me 3 item. You can check data live [HERE].
But Google shows me nothing after 3 weeks in my WemasterTools.

enter image description here