fix(templateRequest): allow empty html template

allow empty html template and not throw error

Closes #9581
This commit is contained in:
Michal Cieplucha
2014-10-21 11:41:19 +02:00
committed by Vojta Jina
parent 38d12de661
commit 52ceec2229
4 changed files with 7 additions and 11 deletions

View File

@@ -43,7 +43,7 @@ describe('$templateRequest', function() {
}).toThrowMinErr('$compile', 'tpload', 'Failed to load template: tpl.html');
}));
it('should throw an error when the template is empty',
it('should not throw an error when the template is empty',
inject(function($rootScope, $templateRequest, $httpBackend) {
$httpBackend.expectGET('tpl.html').respond('');
@@ -55,7 +55,7 @@ describe('$templateRequest', function() {
expect(function() {
$rootScope.$digest();
$httpBackend.flush();
}).toThrowMinErr('$compile', 'tpload', 'Failed to load template: tpl.html');
}).not.toThrow();
}));
it('should keep track of how many requests are going on',