javascript - Issues with external links in ionic app on IOS -


i have ionic app displays user entered text. in text html allowed. example, allowed: <a href="http://www.google.com">go google</a>

i using wysiwyg editor users enter text. https://github.com/fraywing/textangular

when displayed, want link opened in mobile's default browser (safari on ios).

to display text, using text-angular's ta-bind directive:

<div ta-bind ng-model="article.contents"></div>

where article.contents has html text (user entered).

while works fine in android, in ios link opens within webview , breaks app.

there other posts menation in-app-browser plugin , changing links window.open('url', '_blank') not able this.

note text entered in different 'admin' app, web app (also angualr app).

how resolve issue ?

i got resolved using inapp browser , creating custom directive instead of using ta-bind.

.directive('customcompile', ['$compile', function ($compile) {    return function(scope, element, attrs) {      scope.$watch(        function(scope) {          return scope.$eval(attrs.customcompile);        },      function(value) {        element.html(value);        $compile(element.contents())(scope);      } )}; }]) 

i had use 1 more directive solve youtube video issue earlier handled ta-bind.


Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -