feat($interpolate): expose start/end symbols in run phase

previously the startSymbol() and endSymbol() getters were exposed only via provider
in the config phase
This commit is contained in:
Igor Minar
2012-08-10 22:24:42 -07:00
parent fd55bc8e1d
commit 23abb26405
2 changed files with 48 additions and 2 deletions

View File

@@ -113,6 +113,11 @@ describe('$interpolate', function() {
}));
it('should expose the startSymbol in run phase', inject(function($interpolate) {
expect($interpolate.startSymbol()).toBe('((');
}));
it('should not get confused by matching start and end symbols', function() {
module(function($interpolateProvider) {
$interpolateProvider.startSymbol('--');
@@ -139,5 +144,10 @@ describe('$interpolate', function() {
it('should expose the endSymbol in config phase', module(function($interpolateProvider) {
expect($interpolateProvider.endSymbol()).toBe('))');
}));
it('should expose the endSymbol in run phase', inject(function($interpolate) {
expect($interpolate.endSymbol()).toBe('))');
}));
});
});