mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
fix(ngdocs): use cdn version to generate link to source files
Closes #3616 Closes #3675
This commit is contained in:
parent
ffe1665d02
commit
5c4ffb36de
2 changed files with 5 additions and 4 deletions
|
|
@ -20,10 +20,11 @@ describe('Docs Links', function() {
|
|||
});
|
||||
|
||||
it('should have an "view source" button', function() {
|
||||
expect(doc.html()).
|
||||
toContain('<a href="http://github.com/angular/angular.js/tree/v' + gruntUtil.getVersion().number + '/test.js#L42" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a>');
|
||||
});
|
||||
spyOn(gruntUtil, 'getVersion').andReturn({cdn: '1.2.299'});
|
||||
|
||||
expect(doc.html()).
|
||||
toContain('<a href="http://github.com/angular/angular.js/tree/v1.2.299/test.js#L42" class="view-source btn btn-action"><i class="icon-zoom-in"> </i> View source</a>');
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Reference in a new issue