Skip to content

Instantly share code, notes, and snippets.

@sameera207
Created March 3, 2015 09:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sameera207/4cf93cb65970eac6f92c to your computer and use it in GitHub Desktop.
Save sameera207/4cf93cb65970eac6f92c to your computer and use it in GitHub Desktop.
Using Custom URL Schemes In Your Ionic Framework App
// link <a title="recipe" href="sampleapp://recipes/3">recipe</a>
//app.js
function handleOpenURL(url) {
setTimeout(function() {
window.location.hash = '/app/show/' + url.split("/").pop();
}, 500);
}
// following is my router
//.state('app.show', {
// url: '/show/:recipeId',
// views: {
// 'menuContent': {
// templateUrl: 'templates/recipes/show.html',
// controller: 'showRecipeCtrl'
// }
// }
// })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment