Open link in a new widow fro ion-menu

Hi all, I have a side menu where 1 entry need to be an external link. I have tried with this but without lucky:

<ion-item menu-close class="item item-icon-left item-complex">
              <a class="item-content" href="" onclick=", '_system', 'location=yes');return false;">
                  Lo shop<i class="icon ion-bag"></i>

The problem is that the externa lsite is not open in new window, but inside the app and I can not go back.

Where is my error ?



You need to include the in-app browser plugin for that style of link to work correctly.

Hi, thanks for the reply but:

$ ionic plugin add cordova-plugin-inappbrowser
Updated the hooks directory to have execute permissions
Fetching plugin "cordova-plugin-inappbrowser" via plugin registry
npm http GET
npm http 404
Error: 404 Not Found: cordova-plugin-inappbrowser
    at RegClient.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:268:14)
    at Request.self.callback (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:148:22)
    at Request.emit (events.js:98:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:876:14)
    at Request.emit (events.js:117:20)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/node_modules/npm/node_modules/request/index.js:827:12)
    at IncomingMessage.emit (events.js:117:20)
    at _stream_readable.js:943:16
    at process._tickCallback (node.js:419:13)

why ?

CLI v1.4.1



Hi again, I have the solution to my plugin not found error problem:

$ ionic plugin add org.apache.cordova.inappbrowser

npm http GET
npm http 200
npm http GET
npm http 200
Installing "org.apache.cordova.inappbrowser" for android
Installing "org.apache.cordova.inappbrowser" for ios
Saving plugin to package.json file

Is the 0.6 version ok ?



Try using the cordova cli: cordova plugin add cordova-plugin-inappbrowser

There’s a newer version than 0.6 that fixes some bugs.

But if you can’t figure it out, 0.6 will solve your problem.

The original plugin github link is not updated the install command, actually it should be “cordova plugin add org.apache.cordova.inappbrowser”