fruitstand
Version:
27 lines • 909 B
HTML
<html ng-app="myApp">
<head>
<title>AngularJS Expressions</title>
<style>
a{color: blue; text-decoration: underline; cursor: pointer}
</style>
</head>
<body>
<div ng-controller="myController">
<h1>Expressions</h1>
Array:<br>
{{myArr}}<hr>
Elements removed from array:<br>
{{removedArr}}<hr>
<a ng-click="myArr.push(Math.floor(Math.random()*100 + 1))">
Click to append a value to the array</a><hr>
<a ng-click="removedArr.push(myArr.shift())">
Click to remove the first value from the array</a><hr>
Size of Array:<br>
{{myArr.length}}<hr>
Max number removed from the array:<br>
{{Math.max.apply(Math, removedArr)}}<hr>
<script src="http://code.angularjs.org/1.3.0/angular.min.js"></script>
<script src="js/expressions_javascript.js"></script>
</body>
</html>