not working


I am building cross platform app on electron for my project. I have one js file in which i want to open a link which i am getting it from server and opening in new tab using Now on electron initial all tasks are getting performed on electron only the function is opening a new tab in default browser not opening new window in electron itself. Here is my main.js of electron for single click open in new window.

This is main.js from electron for single click new window:
function(module, exports, webpack_require) {

‘use strict’;

Object.defineProperty(exports, “__esModule”, {
value: true

var _electron = webpack_require(14);

function initContextMenu(mainWindow) {
_electron.ipcMain.on(‘contextMenuOpened’, function (event, targetHref) {
var contextMenuTemplate = [{
label: ‘Open in new window’,
click: function click() {
if (targetHref) {
new _electron.BrowserWindow().loadURL(targetHref);

            mainWindow.useDefaultWindowBehaviour = true;

    var contextMenu = _electron.Menu.buildFromTemplate(contextMenuTemplate);
    mainWindow.contextMenuOpen = true;


exports.default = initContextMenu;

and controller.js from where i am using
var popup;
popup =$scope.machineURL, ‘_blank’);