Top 10 Best Angular Examples with Demo

Top 10 Best Angular Examples with Demo

Today, We want to share with you Top 10 Best Angular Examples with Demo.
In this post we will show you Basic Example in array of angular, hear for Best Angular Examples we will give you demo and example for implement.
In this post, we will learn about 10 Best Tutorials To Learn AngularJS with an example.

AngularJS arrays are like sane as JavaScript arrays.
here more than 3 example avilable in this post.

 <div>
<p>The Simple numbers list of Fourth result is =<b> <span></span></b></p>
</div> 

Example 1: AngularJs Array Push Values



<title>Simple Example of AngularJs Array Push Values</title>
 
 
var infinityknowApp = angular.module("infinityknowApp", []);
 infinityknowApp.controller("ng4Ctrl", function($scope) {
 $scope.categoryArray = ['Men','Woman','electric','computer','shope'];
 $scope.pushaddInArraydata = function() {
	 // Total get the input data value
	 var newinputdataVal = $scope.newarrayinvalue;
	 $scope.categoryArray.push(newinputdataVal);
	 
 };
});


  
<div>  
	<div> 
	 
	 Enter a value and click "Push" Button to insert in array.
	 <br>
	 <button>Push</button>
	 <hr />
	 Array = {{categoryArray}}<br>
	 <hr />
	 	 <a href="https://infinityknow.com/">AngularJS Master Example | demo | Download</a>

	</div> 
</div>
  
  

Example 2 : item push in array using AngularJS



<title>AngularJS Array push value - Pakainfo.com</title>



<div>
	 Email:
	<button>Email Add</button>
	<h2>List of Email Address</h2>
	<hr />
	<ul>
		<li> {{$index + 1}} = {{ email }} </li>
	</ul>
	 <hr />
	 <a href="https://infinityknow.com/">AngularJS Master Example | demo | Download</a>

</div>

	function emailaddressCtrl($scope) {
	    $scope.emailaddress = ["[email protected]om", "[email protected]"];

	    $scope.dataaddlist = function() {
		$scope.emailaddress.push($scope.newcontact);
		$scope.newcontact = "";
	    }
	}



How to “push’ a new item value to the middle of an array list?

var countrylist = ["india","pakistan","austreliya", "germany","china"]

function dataAdd (newitem, setpostvalue){
    var datalengthval = countrylist.length;
    for(i = datalengthval -1; i >= setpostvalue; i--){
        countrylist[datalengthval] = countrylist[i];
        datalengthval--;
    };
    countrylist[setpostvalue] = newitem;
};

dataAdd("japan",2) //data value to add it to the middle position


Create an array using ng-init angular js

    
    
	<title>create an Array with AngularJS's ng-init function used</title>
    
    
    
        <div>
            <ul>
                  <h3><font face="Impact" color="green" size="6"><li>{{dataitemlist.name}} - {{dataitemlist.city}}</li></font></h3>
            </ul>
        </div>
			 <a href="https://infinityknow.com/">AngularJS Master Example | demo | Download</a>

    
    
	

We hope you get an idea about Top 10 Best Angular Examples with Demo
We would like to have feedback on my Information blog .
Your valuable any feedback, Good question, Inspirational Quotes, or Motivational comments about this article are always welcome.
If you liked this post, Please don’t forget to share this as Well as Like FaceBook Page.

READ :  AngularJS File-image Upload ng-file-upload | angular-file-upload

We hope This Post can help you…….Good Luck!.

https://pakainfo.com/

Add a Comment

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