Angular with Microdata

2019-04-09 11:50发布

问题:

Does Microdata work with dynamic Angular ng-repeat items?

Can I use it as:

<div itemscope itemtype="http://schema.org/Product" ng-repeat="item in items">
    …
</div>

回答1:

I have found schema validator which, for my site actually shows angular expressions:

...
datePublished  {{lvl_project['year']}}
name          "{{lvl_project['title']}}"
keywords       {{lvl_project['tools'].join(',')}}
...

Furthermore, it does NOT show all of the ng-repeat-generated elements.

This seems to me like a strong indication that the google-bot did not see the angular-generated elements and their values, but there could be more to the issue that I don't know.



回答2:

Yes, you can use...it will work on all (but use if all comes in same category).