aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Minar2013-08-14 14:29:11 -0700
committerIgor Minar2013-08-15 08:27:41 -0700
commit680b8174ac7bcb0fa3c6587dff3b03d92d6b156f (patch)
tree13ed289015901a43f04ec93658a66d5786ae0ac2
parent5e45fd4ac6ff7c00d34deb099fca12301cafd7b0 (diff)
downloadangular.js-680b8174ac7bcb0fa3c6587dff3b03d92d6b156f.tar.bz2
docs($interpolate): fix example for provider w/ custom symbols
-rw-r--r--src/ng/interpolate.js25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/ng/interpolate.js b/src/ng/interpolate.js
index e2e1fa12..7f16bd1d 100644
--- a/src/ng/interpolate.js
+++ b/src/ng/interpolate.js
@@ -10,23 +10,32 @@ var $interpolateMinErr = minErr('$interpolate');
* @description
*
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
- *
+ *
* @example
- <doc:example>
+ <doc:example module="customInterpolationApp">
<doc:source>
<script>
- var myApp = angular.module('App', [], function($interpolateProvider) {
+ var customInterpolationApp = angular.module('customInterpolationApp', []);
+
+ customInterpolationApp.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('//');
$interpolateProvider.endSymbol('//');
});
- function Controller($scope) {
- $scope.label = "Interpolation Provider Sample";
- }
+
+
+ customInterpolationApp.controller('DemoController', function DemoController() {
+ this.label = "This bindings is brought you you by // interpolation symbols.";
+ });
</script>
- <div ng-app="App" ng-controller="Controller">
- //label//
+ <div ng-app="App" ng-controller="DemoController as demo">
+ //demo.label//
</div>
</doc:source>
+ <doc:scenario>
+ it('should interpolate binding with custom symbols', function() {
+ expect(binding('demo.label')).toBe('This bindings is brought you you by // interpolation symbols.');
+ });
+ </doc:scenario>
</doc:example>
*/
function $InterpolateProvider() {