You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/06/12 05:37:20 UTC

[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI opened a new issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

NIYASSURABHI opened a new issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727


   # Bug Report
   
   ## Problem
   
   Cannot detect route (url change)change of angular webapp using inappbrowser. i have to close inappbrowser when url changing.but change cannot detect.
   
   ### What is expected to happen?
   
   Have to close Inapp browser when url changing in angular web app.
   
   ### What does actually happen?
   
   Url not changing
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   Ionic 4 Inapp browser
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
    var options = "location=no,toolbar=yes";
       const browser = this.iab.create('my url', '_blank', options);
       browser.on('loadstart').subscribe((event) => {
   
         var reg = "login";
         if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
           browser.close();
           this.navctrl.navigateRoot('/auth');
         }
       });
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] xuanphu123 commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
xuanphu123 commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-698084088


   @NIYASSURABHI on angular site....try using <a href="/back.html">back</a>
   then u can detect url change on "loadstart" or "loadstop" .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] xuanphu123 edited a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
xuanphu123 edited a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-698084088


   @NIYASSURABHI on angular site....try using "<a href="/back.html">back</a>"
   then u can detect url change on "loadstart" or "loadstop" .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] timbru31 commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
timbru31 commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643153537


   Your issue is missing the required version information, can you please add those? Otherwise, we are unable to help.
   
   Thanks!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-644523588


   Any help..


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI edited a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI edited a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643182858


   > Have you tried calling it within ngZone?
   > 
   > ```js
   >   constructor(private _ngZone: NgZone [, ...]) {}
   >   
   >   [...]
   >   if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
   >     browser.close();
   >     this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
   >   }
   >   [...]
   > ```
   
   Now i tried with ngzone also. but no use. same as before. my url is not changing. it always showing the same url in inappbrowser even after page is changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643386024


   > > > Your issue is missing the required version information, can you please add those? Otherwise, we are unable to help.
   > > > Thanks!
   > > 
   > > 
   > > I have updated my question with the package json file.
   > 
   > Thanks. However, it's still not clear if this affect iOS, Android or both.
   
   its affect both iOS and Android.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI removed a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI removed a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643181556


   > Have you tried calling it within ngZone?
   > 
   > ```js
   >   constructor(private _ngZone: NgZone [, ...]) {}
   >   
   >   [...]
   >   if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
   >     browser.close();
   >     this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
   >   }
   >   [...]
   > ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI edited a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI edited a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643182858


   > Have you tried calling it within ngZone?
   > 
   > ```js
   >   constructor(private _ngZone: NgZone [, ...]) {}
   >   
   >   [...]
   >   if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
   >     browser.close();
   >     this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
   >   }
   >   [...]
   > ```
   
   Now i tried with ngzone also. but no use. my url is not changing. it always showing the same url in inappbrowser even after page is changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] antikalk commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
antikalk commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643121931


   Have you tried calling it within ngZone?
   
   ```javascript
     constructor(private _ngZone: NgZone [, ...]) {}
     
     [...]
     if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
       browser.close();
       this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
     }
     [...]
   ```


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643181076


   > Your issue is missing the required version information, can you please add those? Otherwise, we are unable to help.
   > 
   > Thanks!
   
   I have updated my question with the package json file.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] timbru31 commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
timbru31 commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643332580


   > 
   > 
   > > Your issue is missing the required version information, can you please add those? Otherwise, we are unable to help.
   > > Thanks!
   > 
   > I have updated my question with the package json file.
   
   Thanks. However, it's still not clear if this affect iOS, Android or both.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] xuanphu123 edited a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
xuanphu123 edited a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-698084088






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] tkau87 commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
tkau87 commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-686590564


   Hi
   
   I had the exact same issue. If you navigate to your path '/login' using this.navctrl.navigateRoot('/login') (or nagigateByUrl as i did), the events 'loadstop / loadstart' will not be triggered, instead try to use window.href = http://yourredirectionurl.com
   It worked fine for me, the url change was detected and loadstart and loadstop events were triggered properly after that


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643182858


   > Have you tried calling it within ngZone?
   > 
   > ```js
   >   constructor(private _ngZone: NgZone [, ...]) {}
   >   
   >   [...]
   >   if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
   >     browser.close();
   >     this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
   >   }
   >   [...]
   > ```
   
   But my url is not changing. it always showing the same url in inappbrowser even after page is changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] xuanphu123 edited a comment on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
xuanphu123 edited a comment on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-698084088


   @NIYASSURABHI on angular site....try using `<a href="/back.html">back</a>`
   then u can detect url change on "loadstart" or "loadstop" .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] NIYASSURABHI commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
NIYASSURABHI commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-643181556


   > Have you tried calling it within ngZone?
   > 
   > ```js
   >   constructor(private _ngZone: NgZone [, ...]) {}
   >   
   >   [...]
   >   if (event.url.toString().includes('login/') && !event.url.toString().toLowerCase().includes(reg.toLowerCase())) {
   >     browser.close();
   >     this._ngZone.run(() => { this.navctrl.navigateRoot('/auth'); });
   >   }
   >   [...]
   > ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-plugin-inappbrowser] xuanphu123 commented on issue #727: Route change in angular webapp cannot detect using ionic 4 Inapp browser

Posted by GitBox <gi...@apache.org>.
xuanphu123 commented on issue #727:
URL: https://github.com/apache/cordova-plugin-inappbrowser/issues/727#issuecomment-698084088


   @NIYASSURABHI on angular site....try using <a href="/back.html">back</a>
   then u can detect url change on "loadstart" or "loadstop" .


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org