Created
December 22, 2017 21:37
-
-
Save n1lesh/578d12214a3a4ffd268ff348474c5282 to your computer and use it in GitHub Desktop.
Adding ld+json structured data to AngularJs app Raw - Controller Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.controller('homeController', ['$scope', function ($scope) { | |
$scope.$root.ld = { | |
"@context": "http://schema.org/", | |
"@type": "WebSite", | |
"name": 'My Wonderful Site', | |
"image": "https://mywonderfulsite.com/logo.png", | |
"description": 'We have the best content in the world', | |
"url": 'https://mywonderfulsite.com/' | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment