My Blog contain Phonegap,CMS related posts. Here I am posting the issues solution that I faced while development and its difficult to find proper solution on other sites. I hope my post will help you with your issues. Developer rocks.
Showing posts with label ionic. Show all posts
Showing posts with label ionic. Show all posts
Thursday, November 22, 2018
Whatsapp message from hybrid app
There are two different ways to open whatsapp form hybrid application.
<a target="_blank" href="whatsapp://send?text=hello">open whatsapp</a>
<a target="_blank" href="whatsapp://send?text=my message&phone=+XXXXXXXXXXXX&abid=+XXXXXXXXXXXX">Whatsapp me please</a>
Monday, July 24, 2017
Log execution time of function/Ajax Call
Initialization of the variable to store all logs incontroller
$rootScope. = {}; timeSlots
//Function to createwith object eventname start time, end time using , ID
$scope.logEvent = function(Eventid, EventName, isEnd){if ( isEnd == false) { $rootScope. timeSlots [ Eventid] = { "name ":EventName , "startDate ": new Date( ). getTime ( ) }; }else { $rootScope. timeSlots [ Eventid] ["endDate "] = new Date( ). getTime ( ); } };Log starting time$scope. "function1" logEvent ( , "Function1 start Time", false);
Labels:
AngularJS,
click,
cordova,
dynamic,
empty,
function,
getting started,
html,
ionic,
javascript,
phonegap,
template,
tricks
Tuesday, June 20, 2017
Angular/Ionic not updating an image src when ng-src is empty
The Angular
ngSrc directive serves to properly set an image src via Angular. As anything in Angular, it updates the image as soon as the contained Angular expression changes. However, when the ng -src attribute is empty, Angular will not empty the src attribute. To overcome this, use the trick below.
<img ng-src="{{ element.image || '//:0' }}" />
Background
The src when the image is empty. As somebody on Stackoverflow writes,
ngSrc directive explicitly returns when the attribute value is false. As a workaround, set a "blank" image //: 0 serves this purpose: It adopts the current protocol, omits the hostname and sets the port to zero, which is invalid and should be killed by the network layer.
As a result, Angular should now correctly empty the
src attribute when ng -src empties.
Labels:
android,
AngularJS,
appbuilding,
cordova,
cross-domain,
dynamic,
element type,
empty,
html,
ionic,
iphone,
javascript,
json,
link,
phonegap,
plugins,
template,
tricks,
validations,
web
Change timeout for connection request in iOS
Code to change ajax request timeout for ios and also for hybrid( Cordova) apps.
Find NSURLRequest in your native code. Change thetimeoutInterval value.
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:serverURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15.0];
👍
Find NSURLRequest in your native code. Change the
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:serverURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:15.0];
👍
Tuesday, September 6, 2016
IONIC - data binding on header title not working
By using the new ion-nav-title directive in Ionic beta 14, the binding seems to work correctly.
Rather than
<ion-view title="{{content.title}}">
Do this
<ion-view> <ion-nav-title>{{content.title}}</ion-nav-title>
Works a treat.
Labels:
android,
AngularJS,
appbuilding,
class,
cordova,
cross-domain,
dynamic,
html,
ionic,
iphone,
phonegap
Subscribe to:
Posts (Atom)