0

I am developing an mobile application for android using Ionic and Web Api.

The application working fine when I run this app on the browser emulator but when I trying to deploy on real device it gives me an error login failed.

In app.js

angular.module('starter', ['ionic', 'starter.controllers', 'starter.services', 'services.hub', 'ngStorage', 'angularUUID2', 'ui.bootstrap', 'roy.signalr-hub','angularMoment'])
    .constant('/api', {
        url: 'http://ipAddress/api'
    })

ionic.project file

{
  "name": "ChatApp",
  "app_id": "",
 "proxies": [
  {
    "path": "/api",
    "proxyUrl": "http://ipAddress/api"
  }
  ]
}

Having an login screen click on login should be happen. I am not able to debug the code using real device also.

4
  • What type of error are you getting and what type of device? If it's on Android, you may want to look and see if you've installed android-whitelist. I've had that problem just recently and it fixed it for me. But let me know what the exact error is and I'll try to help. Commented Sep 12, 2016 at 13:26
  • @Indy-Jones doing for android. I have just updated the question Commented Sep 12, 2016 at 13:31
  • @Indy-Jones also android-whitelist is installed Commented Sep 12, 2016 at 13:44
  • 1
    @MartinP: I guess you're using IIS Express. Am I right? Best option is to install IISExpress Proxy and configure the device in Google Chrome. Commented Sep 13, 2016 at 7:08

2 Answers 2

1

If you are working only on Android Device, I will suspect you are working on a Windows. If that's the case, then when you run the project in your device, the console should be working. If it does not show you any error, then there's a logic error in the code. But as a suggestion, use console.log on cases like this one.

Sign up to request clarification or add additional context in comments.

Comments

0

May be you can use console.log() or 'ionic alert()'.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.