Friday, 20 July 2018

AngularJS Expressions

AngularJS expressions are written inside double braces: {{ expression }}.
Example 1:
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>
<div ng-app="">
 <p>Enter Age:</p>
<p>Age: <input type="text" ng-model="ag"></p>
<p>{{ag}}</p>
</div>
</body>
</html>
Example 2:
<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>

<div ng-app="">
 <p>Enter two number:</p>
<p>a value: <input type="number" ng-model="a"></p>
<p>b value: <input type="number" ng-model="b"></p>
<p>{{(a+b)}}</p>
</div>
</body>
</html>

1 comment:

  1. Python is an open-source, high level, interpreted programming language which offers great opportunities for object-oriented programming. Choosing a python training program from Red Prism Group, which is best training institute for python in noida.

    ReplyDelete

apply function in R

1) apply function: It takes 3 arguments matrix,margin and function.. Example: m<-matrix(c(1,2,3,4),nrow=2,ncol=2) m #1 indicates it is ap...