docs(ngPluralize): update example to use a module

This commit is contained in:
Brian Ford
2014-07-07 23:38:00 -07:00
parent 2788cc4e12
commit 514da451fc

View File

@@ -89,16 +89,17 @@
* @param {number=} offset Offset to deduct from the total number.
*
* @example
<example>
<example module="pluralizeExample">
<file name="index.html">
<script>
function Ctrl($scope) {
$scope.person1 = 'Igor';
$scope.person2 = 'Misko';
$scope.personCount = 1;
}
angular.module('pluralizeExample', [])
.controller('ExampleController', ['$scope', function($scope) {
$scope.person1 = 'Igor';
$scope.person2 = 'Misko';
$scope.personCount = 1;
}]);
</script>
<div ng-controller="Ctrl">
<div ng-controller="ExampleController">
Person 1:<input type="text" ng-model="person1" value="Igor" /><br/>
Person 2:<input type="text" ng-model="person2" value="Misko" /><br/>
Number of People:<input type="text" ng-model="personCount" value="1" /><br/>