Skip to content

Instantly share code, notes, and snippets.

@threewordphrase
Created October 8, 2014 13:08
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 threewordphrase/e68acb3c64073bd71a75 to your computer and use it in GitHub Desktop.
Save threewordphrase/e68acb3c64073bd71a75 to your computer and use it in GitHub Desktop.
ui-router magic
shooter.createSitemap = function (postableData) {
SitemapService.create({sid: siteId}, postableData, function (data) {
$state.go('site.viewSitemap', {sid: siteId, sitemapId: data.data.id});
}, function (data) { //failure
//error handling goes here
Noty(data.data.message, 'error');
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment