Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 925b208

Browse files
committed
fix(docs): change plnkr form to open in same window
Form previously posted to target="_blank", but pop-up blockers were causing this to not work. If a user chose to bypass pop-up blocker one time and click the link, they would arrive at a new default plnkr, not a plnkr with the desired template. This fix removes the _blank target, causing the plnkr to open in the current window/tab.
1 parent 8a27aba commit 925b208

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/app/src/examples.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@ angular.module('examples', [])
22

33
.factory('formPostData', ['$document', function($document) {
44
return function(url, fields) {
5-
var form = angular.element('<form style="display: none;" method="post" action="' + url + '" target="_blank"></form>');
5+
/**
6+
* Form previously posted to target="_blank", but pop-up blockers were causing this to not work.
7+
* If a user chose to bypass pop-up blocker one time and click the link, they would arrive at
8+
* a new default plnkr, not a plnkr with the desired template.
9+
*/
10+
var form = angular.element('<form style="display: none;" method="post" action="' + url + '"></form>');
611
angular.forEach(fields, function(value, name) {
712
var input = angular.element('<input type="hidden" name="' + name + '">');
813
input.attr('value', value);

0 commit comments

Comments
 (0)