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.

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.

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


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');
	};
});


  
Web Programming Tutorials Example with Demo

Read :

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.

Leave a Comment