What is AngularJS API and Include

 

 

AngularJS API

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:

  1. lowercase() It converts string to lowercase
  2. uppercase() It converts strings to uppercase
  3. isString() It returns true if the reference is a string
  4. isNumber() It returns true if the reference is a number

Let’s understand using one example of angular.lowercase()

Output

These APIs takes values as a parameter and after performing suitable actions, they return the result.

 

AngularJS Includes

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 myFile.htm.

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 of angular_include.asp page

 

Be Connected…

Satyendra

 

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

,

About Satyendra Mishra

Microsoft certified, motivated, energetic and accomplished SharePoint Consultant and Architect with 13+ years of work experience in Management, Architecture, Analytics, Development and Maintenance. He has been fortunate to be a part of over 20+ Web/Mobile/Software SharePoint and .Net projects delivery with various companies across different industry sectors. This has provided him a valuable insight and experience especially in successful implementation of technology solutions. Having very strong System Architecture, Technological, Management & Analytical Skills, Knowledge of Office 365, SharePoint, .Net, JavaScript, React, Angular, Azure, SQL. In 2016, he decided to start sharing the knowledge back to society in the form for content writing and blogging.
View all posts by Satyendra Mishra →

Leave a Reply

Your email address will not be published. Required fields are marked *