{{value}}
<html ng-app>
<head> <script> function MyCtrl($scope) { $scope.value = 1; $scope.incrementValue = function(value) { $scope.value += 1; }; } </script> <link rel="stylesheet" href="css/bootstrap.css"> </head> <body ng-app> <div ng-controller="MyCtrl"> <p ng-init="incrementValue(5)">{{value}}</p> </div> </body> </html> |