This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,32 @@ var $interpolateMinErr = minErr('$interpolate');
10
10
* @description
11
11
*
12
12
* Used for configuring the interpolation markup. Defaults to `{{` and `}}`.
13
- *
13
+ *
14
14
* @example
15
- <doc:example>
15
+ <doc:example module="customInterpolationApp" >
16
16
<doc:source>
17
17
<script>
18
- var myApp = angular.module('App', [], function($interpolateProvider) {
18
+ var customInterpolationApp = angular.module('customInterpolationApp', []);
19
+
20
+ customInterpolationApp.config(function($interpolateProvider) {
19
21
$interpolateProvider.startSymbol('//');
20
22
$interpolateProvider.endSymbol('//');
21
23
});
22
- function Controller($scope) {
23
- $scope.label = "Interpolation Provider Sample";
24
- }
24
+
25
+
26
+ customInterpolationApp.controller('DemoController', function DemoController() {
27
+ this.label = "This bindings is brought you you by // interpolation symbols.";
28
+ });
25
29
</script>
26
- <div ng-app="App" ng-controller="Controller ">
27
- //label//
30
+ <div ng-app="App" ng-controller="DemoController as demo ">
31
+ //demo. label//
28
32
</div>
29
33
</doc:source>
34
+ <doc:scenario>
35
+ it('should interpolate binding with custom symbols', function() {
36
+ expect(binding('demo.label')).toBe('This bindings is brought you you by // interpolation symbols.');
37
+ });
38
+ </doc:scenario>
30
39
</doc:example>
31
40
*/
32
41
function $InterpolateProvider ( ) {
You can’t perform that action at this time.
0 commit comments