AngularJS API
API means A pplication P rogramming I nterface (application programming interface).
AngularJS global API
AngularJS global API for performing common tasks JavaScript function set, such as:
- Compare objects
- Object Iteration
- Translate Objects
Global API functions use angular objects accessible.
Here are some common API functions:
API | description |
---|---|
angular.lowercase () | Convert the string to lowercase |
angular.uppercase () | Convert a string to uppercase |
angular.isString () | Determining whether a given object is a string, if it returns true. |
angular.isNumber () | Determining whether a given object is a number, if it returns true. |
angular.lowercase ()
Examples
<Div ng-app = "myApp " ng-controller = "myCtrl">
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.lowercase ($ scope.x1);
});
</ Script>
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.lowercase ($ scope.x1);
});
</ Script>
try it"
angular.uppercase ()
Examples
<Div ng-app = "myApp " ng-controller = "myCtrl">
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "John";
$ Scope.x2 = angular.uppercase ($ scope.x1);
});
</ Script>
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "John";
$ Scope.x2 = angular.uppercase ($ scope.x1);
});
</ Script>
try it"
angular.isString ()
Examples
<Div ng-app = "myApp " ng-controller = "myCtrl">
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.isString ($ scope.x1);
});
</ Script>
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.isString ($ scope.x1);
});
</ Script>
try it"
angular.isNumber ()
Examples
<Div ng-app = "myApp " ng-controller = "myCtrl">
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.isNumber ($ scope.x1);
});
</ Script>
<P> {{x1}} </ p>
<P> {{x2}} </ p>
</ Div>
<Script>
var app = angular.module ( 'myApp', []);
app.controller ( 'myCtrl', function ($ scope) {
$ Scope.x1 = "JOHN";
$ Scope.x2 = angular.isNumber ($ scope.x1);
});
</ Script>
try it"