get external link opening in browser
This commit is contained in:
parent
0d34b4d2f7
commit
2f8795b9a0
3 changed files with 7 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.directives')
|
angular.module('copayApp.directives')
|
||||||
.directive('incomingDataMenu', function($timeout, $rootScope, $state) {
|
.directive('incomingDataMenu', function($timeout, $rootScope, $state, externalLinkService) {
|
||||||
return {
|
return {
|
||||||
restrict: 'E',
|
restrict: 'E',
|
||||||
templateUrl: 'views/includes/incomingDataMenu.html',
|
templateUrl: 'views/includes/incomingDataMenu.html',
|
||||||
|
|
@ -19,6 +19,9 @@ angular.module('copayApp.directives')
|
||||||
scope.showMenu = false;
|
scope.showMenu = false;
|
||||||
$rootScope.$broadcast('incomingDataMenu.menuHidden');
|
$rootScope.$broadcast('incomingDataMenu.menuHidden');
|
||||||
};
|
};
|
||||||
|
scope.goToUrl = function(url){
|
||||||
|
externalLinkService.open(url);
|
||||||
|
};
|
||||||
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
scope.sendPaymentToAddress = function(bitcoinAddress) {
|
||||||
scope.showMenu = false;
|
scope.showMenu = false;
|
||||||
$state.go('tabs.send').then(function() {
|
$state.go('tabs.send').then(function() {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,8 @@ angular.module('copayApp.services').factory('incomingData', function($log, $ioni
|
||||||
}
|
}
|
||||||
|
|
||||||
data = sanitizeUri(data);
|
data = sanitizeUri(data);
|
||||||
data = '1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX';
|
//data = '1F1tAaz5x1HUXrCNLbtMDqcw6o5GNn4xqX';
|
||||||
|
console.log('brroooooo');
|
||||||
|
|
||||||
// BIP21
|
// BIP21
|
||||||
if (bitcore.URI.isValid(data)) {
|
if (bitcore.URI.isValid(data)) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="incoming-data-menu__item item item-icon-right" ng-href="{{data}}" target="_blank">
|
<a class="incoming-data-menu__item item item-icon-right" ng-click="goToUrl(data)">
|
||||||
<img src="img/icon-link-external.svg">
|
<img src="img/icon-link-external.svg">
|
||||||
<div>Open website</div>
|
<div>Open website</div>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue