Created
May 24, 2017 07:33
-
-
Save shirazz/7dd05b3f0f9315cde7d5046ff6f4974c to your computer and use it in GitHub Desktop.
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
html(lang="en", ng-app='test', ng-strict-di) | |
head | |
title(ng-bind="tfMetaTags.title") | |
meta(charset="utf-8") | |
meta(http-equiv="X-UA-Compatible", content="IE=edge") | |
meta(name="viewport", content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0") | |
meta(name="fragment", content="!") | |
meta(ng-repeat="(key, value) in tfMetaTags.properties", name="{{key}}", content="{{value}}") | |
base(href="/") |
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
.state('products.product', { | |
url: '/', | |
views: { | |
content: { | |
templateUrl: 'product.html', | |
controller: 'ProductCtrl' | |
} | |
}, | |
resolve: { | |
/* @ngInject */ | |
movieData: function($q, $timeout) { | |
var deferred = $q.defer(); | |
$timeout(function() { | |
deferred.resolve({ | |
title: 'The Lord of the Rings: The Fellowship of the Ring', | |
year: 2001, | |
summary: 'A meek hobbit of the Shire and eight companions set out on a journey to Mount Doom to destroy the One Ring and the dark lord Sauron.' | |
}); | |
}, 1000); | |
return deferred.promise; | |
} | |
}, | |
tfMetaTags: { | |
/* @ngInject */ | |
title: function(movieData) { | |
return movieData.title; | |
}, | |
properties: { | |
description: 'Summary: {{movieData.summary}}; Year: {{movieData.year}}' | |
} | |
} | |
}) |
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
<title data-ng-bind="tfMetaTags.title" class="ng-binding">movieData,function title(movieData) { return movieData.title} </title> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment