Works with alecgorge/express-static-angular-seo to deliever static version of websites to bots (google, twitter, facebook, etc).
Install on bower using
bower install angular-static-seo --save
-
Include
angular-static-seo.jsorangular-static-seo.min.json your webpage by downloading it from GitHub or using Bower. -
Add
seoas a dependency:app = angular.module('app-name', ['seo']) -
Call
$scope.startedLoading()for every time an asyncronous event starts and$scope.startedLoading()once each is complete. When they are all complete,express-static-angular-seowill know to capture the HTML and send it to the Googlebot/Twitterbot etc.
angular.module('sample-app')
.controller('LoadData', ['$scope', ($scope) ->
$scope.startedLoading()
$http.get('/route').success (results) ->
$scope.finishedLoading()
$scope.startedLoading()
$http.get('/moreDataInTheSameController').success (results) ->
$scope.finishedLoading()