Posts

HTACCESS FOR URL ROUTING FOR ANGULAR 2 APPLICATION

/*HTACCESS FOR URL ROUTING FOR ANGULAR 2 APPLICATION*/ RewriteEngine On # If an existing asset or directory is requested go to it as it is RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule ^ - [L] # If the requested resource doesn't exist, use index.html RewriteRule ^ /index.html

Get the YouTube video ID from YouTube video URL Using Javascript

Use the below function to get the YouTube video ID from YouTube video URL /** * @param video_url String YouTube video link * @return String YouTube video ID */ function getMyYoutubeVideoId(video_url){ var l = document.createElement("a"); l.href = video_url; var frameId=''; var hostname=l.hostname; var path= l.pathname; var query=l.search; if(hostname=='youtu.be' || hostname=='www.youtu.be'){ frameId=path.replace('/',''); }else if(path=='/watch'){ var queryArray=query.split('='); frameId=queryArray[1]; }else if(path.substr(0,7)=='/embed/'){ frameId=path.substr(7); } return frameId; }

How To Use Crosswalk in Ionic 2 or 3 To Solve Compatibility Issue in Android

To use the crosswalk in ionic app follow the below steps: First, create an ionic app As the crosswalk doesn't support the Cordova 3.6(latest version) so you have to install the Cordova android platform 3.5 To install Cordova android platform 3.5, run this command:  codova platform add android@3.5 Then download the crosswalk and extract(Two version X86 and ARM) Then navigate to your  application/platform/android/cordovaLib  directory Then delete everything inside that directory Then open the extracted crosswalk folder and navigate to the framework directory Then copy all the files and paste into your application/platform/android/cordovaLib directory Then open the ARM version and navigate to  xwalk_core_lib/libs/  Then copy the folder which start with arm and paste into  application/platform/android/cordovaLib/xwalk_core_lib/libs/  directory And one last file you need to copy is the version file from  xwalk_core_lib  di...