docs($interpolate): fix example for provider w/ custom symbols

This commit is contained in:
Igor Minar 2013-08-14 14:29:11 -07:00
parent 5e45fd4ac6
commit 680b8174ac

View file

@ -10,23 +10,32 @@ var $interpolateMinErr = minErr('$interpolate');
* @description * @description
* *
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`. * Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
* *
* @example * @example
<doc:example> <doc:example module="customInterpolationApp">
<doc:source> <doc:source>
<script> <script>
var myApp = angular.module('App', [], function($interpolateProvider) { var customInterpolationApp = angular.module('customInterpolationApp', []);
customInterpolationApp.config(function($interpolateProvider) {
$interpolateProvider.startSymbol('//'); $interpolateProvider.startSymbol('//');
$interpolateProvider.endSymbol('//'); $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> </script>
<div ng-app="App" ng-controller="Controller"> <div ng-app="App" ng-controller="DemoController as demo">
//label// //demo.label//
</div> </div>
</doc:source> </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> </doc:example>
*/ */
function $InterpolateProvider() { function $InterpolateProvider() {