Home » How to Open URL in New Tab using Angular

How to Open URL in New Tab using Angular

Today, We want to share with you How to Open URL in New Tab using Angular.js 2.In this post we will show you AngularJs open link in new tab, hear for AngularJs open link in new tab Example For AngularJs open link in new tab we will give you demo and example for implement.In this post, we will learn about angularjs 2 open external link in new tab with an example.

Read Also:  PHP Web Application create Installer scripts

How to Open URL in New Tab using Angular.js 2

There are the Following The simple About How to Open URL in New Tab using Angularjs 2 Full Information With Example and source code.

As I will cover this Post with live Working example to develop angular router navigate new tab, so the Open a link without clicking on it using Angularjs for this example is following below angularjs open new tab.

Read Also:  Data auto Load While scrolling page down with jquery PHP and MySQL
angularjs open new tab, angular open new tab, angular open link in new tab

AngularJs – Open url in new tab

Javascript Part

angular.module('root', [])
    .controller('FlashAppController', ['$scope', '$window', function ($scope, $window) {
    $scope.redirectToInfinityknow = function () {
        $window.open('https://www.infinityknow.com', '_blank');
    };
}]);

HTML Part

AngularJs new tab link

<div> 
    <a>Hello</a>
</div>

Example : AngularJs open link in new tab

index.html





var shopApp = angular.module("shopApp", []);
	shopApp.controller("FlashAppController", function($scope,$window) {
		$scope.openNewLink = function() {
		$window.open('http://www.pakainfo.org', '_blank');
	};
});


  
<div>  
	<div>  
	 
</div> 
  

Web Programming Tutorials Example with Demo

Read :

Read Also:  How to Send Twitter Automatically Tweets with PHP

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to Open URL in New Tab using Angularjs 2.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.


Related FAQ

Here are some more FAQ related to this Article:

  1. Read Also:  How to get difference between two dates in laravel?
  2. Read Also:  How to Open URL in New Tab using KnockoutJS
  3. Read Also:  UI Grid (ng-grid) using Angular Example
  4. Read Also:  Like Dislike system with PHP and MySQL
  5. Read Also:  Laravel get multiple checkbox value From View to Controller
  6. Read Also:  How to uninstall cordova and ionic in ubuntu
  7. Read Also:  MySQL LEFT Inner and outer where clause joins
  8. Read Also:  How to convert base64 to image and save in folder php?
  9. Read Also:  How to get difference between two dates in laravel?
  10. Read Also:  How to uninstall cordova and ionic in ubuntu

Leave a Comment

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