Tutorialsplane

Concat string in AngularJs


Concat string in AngularJs -There are many ways to concat two strings, You can use JavaScript concat() method to concat two or more than two strings in AngularJs. Here in this tutorial we are going to explain how you can join two or more than two strings in angularjs. You can also use our online editor to edit and run the code online.


How to Concat string in AngularJs | Join Strings Example

Let us go step by step to create an example to join strings in AngularJs using JavaScript Concat() method-

JavaScript Part

JavaScript Part Contains the following part as below –

Concat string in AngularJs :

 

Html Part

Html Part contains the following html as below –

Angularjs Join Strings example:

<div ng-app="myApp">  
<div ng-controller="myController">  

<p>Result = {{result}}</p>
       
 
</div> 
</div>

Complete Part

Now let us combine Html and JavaScript Together to create full example like this –

Angularjs Join Strings example



 
 

  
<div ng-app="myApp">  
<div ng-controller="myController">  

<p>Result = {{result}}</p>

       
 
</div> 
</div>
  
      

Try it »

If you run the above example it will produce output something like this –