API is a short form of Application Programming Interface. AngularJS provides a set of APIs to use in AngularJS application.
These APIs are called as Global API. We can access these APIs using angular object. Most commonly used Global API functions are listed below:
- lowercase() It converts string to lowercase
- uppercase() It converts strings to uppercase
- isString() It returns true if the reference is a string
- isNumber() It returns true if the reference is a number
Let’s understand using one example of angular.lowercase()
These APIs takes values as a parameter and after performing suitable actions, they return the result.
Using AngularJS Includes, we can include HTML from external html file. We use AngularJS directive ng-include including HTML.
Let’s see an example.
Output will be browser parsed HTML written in.
Include AngularJS Code in external file
Actually this directive replaces associated HTML element to the HTML available in external HTML file. So we can include AngularJS code as well. The code written in external file is also executed at runtime.
Include Cross Domain HTML files
By default, AngularJS does not allow include of external files which are available in other domain. We need to add a whitelist of legal and trusted files or domains n configuration function of AngularJS application.
Output will be HTML ofpage
THREE QUERIES offers easy access to information about SharePoint and associated technologies, project management, agile and scrum methodologies that helps developers, administrators, architects, technical managers, business analysts and end users. It has grown from there. We provide an important knowledge base for those involved in managing, architecture and developing software projects of all kinds. With weekly/daily exclusive updates, we keep you in touch with the latest business, management, technology thinking.
WE ARE CONNECTED ~ Follow us on social media to get regular updates and opinion on what's happening in the world of SharePoint, front-end, back end web technologies and project management. If you like this article, please share it and follow us at Facebook, Twitter, Instagram, Pinterest and LinkedIn