diff --git a/docs/spec/sourceLinkSpec.js b/docs/spec/sourceLinkSpec.js
index 3dc73cc85c37..c17d3cccfbce 100644
--- a/docs/spec/sourceLinkSpec.js
+++ b/docs/spec/sourceLinkSpec.js
@@ -18,10 +18,14 @@ describe('Docs Links', function() {
expect(doc.html()).
toContain(' Improve this doc');
});
+
+ it("should have a defined gruntUtil.getVersion().cdn property", function () {
+ expect(gruntUtil.getVersion().cdn).toBeDefined();
+ });
it('should have an "view source" button', function() {
expect(doc.html()).
- toContain(' View source');
+ toContain(' View source');
});
});
diff --git a/docs/src/ngdoc.js b/docs/src/ngdoc.js
index 88d595af9824..e752b44709d1 100644
--- a/docs/src/ngdoc.js
+++ b/docs/src/ngdoc.js
@@ -437,7 +437,7 @@ Doc.prototype = {
if (this.section === 'api') {
dom.tag('a', {
href: 'http://github.com/angular/angular.js/tree/v' +
- gruntUtil.getVersion().number + '/' + self.file + '#L' + self.line,
+ gruntUtil.getVersion().cdn + '/' + self.file + '#L' + self.line,
class: 'view-source btn btn-action' }, function(dom) {
dom.tag('i', {class:'icon-zoom-in'}, ' ');
dom.text(' View source');