AngularJS API
API bedeutet Anwendungsprogrammierschnittstelle.
AngularJS Global API
AngularJS Global API ist eine Sammlung von JavaScript -Funktionen, die zur Ausführung gemeinsamer Aufgaben verwendet werden, wie z. B.:
Vergleichsobjekt
Iterative Objekte
Objekt konvertieren
Globale API -Funktionen werden unter Verwendung von Winkelobjekten zugegriffen.
Hier sind einige allgemeine API -Funktionen:
| API | beschreiben |
|---|---|
| Angular.lowerCase () | Saite in Kleinbuchstaben konvertieren |
| Angular.uppercase () | Saite in Großbuchstaben konvertieren |
| Angular.isstring () | Bestimmt, ob es sich bei dem angegebenen Objekt um eine Zeichenfolge handelt, und gibt true zurück, wenn dies der Fall ist. |
| angular.isNumber () | Bestimmt, ob das angegebene Objekt eine Zahl ist, und gibt true zurück, wenn dies der Fall ist. |
Angular.lowerCase ()
<! DocType html> <html> <head> <meta charset = "utf-8"> <script src = "http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js" ng-controller = "myctrl"> <p> {{x1}} </p> <p> {{{x2}} </p> </div> <script> var app = angular.module ('myapp', []) app.controller ('mycTrops', function ($ scope) {$ scope. {$ scope) {{$ scope) {{$ accope) {{$ accope) {{$ cePe. {$ cePe.x1 = "; Angular.lowerCase ($ scope.x1);}); </script> </body> </html>Auslaufergebnisse:
JOHN
John
Angular.uppercase ()
<! DocType html> <html> <head> <meta charset = "utf-8"> <script src = "http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js" ng-controller = "myctrl"> <p> {{x1}} </p> <p> {{{x2}} </p> </div> <script> var app = angular.module ('myapp', []) app.controller ('mycTrops', function ($ scope) {$ scope. {$ scope) {{$ scope) {{$ accope) {{$ accope) {{$ cePe. {$ cePe.x1 = "; Angular.isstring ($ scope.x1);}); </script> </body> </html>Auslaufergebnisse:
JOHN
WAHR
Angular.isstring ()
<! DocType html> <html> <head> <meta charset = "utf-8"> <script src = "http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js" ng-controller = "myctrl"> <p> {{x1}} </p> <p> {{{x2}} </p> </div> <script> var app = angular.module ('myapp', []) app.controller ('mycTrops', function ($ scope) {$ scope. {$ scope) {{$ scope) {{$ accope) {{$ accope) {{$ cePe. {$ cePe.x1 = "; Angular.isstring ($ scope.x1);}); </script> </body> </html>Auslaufergebnisse:
JOHN
WAHR
angular.isNumber ()
<! DocType html> <html> <head> <meta charset = "utf-8"> <script src = "http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js" ng-controller = "myctrl"> <p> {{x1}} </p> <p> {{{x2}} </p> </div> <script> var app = angular.module ('myapp', []) app.controller ('mycTrops', function ($ scope) {$ scope. {$ scope) {{$ scope) {{$ accope) {{$ accope) {{$ cePe. {$ cePe.x1 = "; angular.isNumber ($ scope.x1);}); </script> </body> </html>Auslaufergebnisse:
JOHN
FALSCH
Das obige ist eine Zusammenstellung von AngularJS -API -Daten (Schnittstellen) und wird später ergänzt. Ich hoffe, dass Schüler, die beim Programmieren helfen können.