Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Text only

ionic link

<a href="#/app/privacy">
https://snipt.net/embed/522d98c8977fbab70f716adfe325bdfd/
https://snipt.net/raw/522d98c8977fbab70f716adfe325bdfd/
522d98c8977fbab70f716adfe325bdfd
text
Text only
1
2016-12-08T18:34:26
True
False
False
Jun 27, 2016 at 08:57 PM
/api/public/snipt/147293/
ionic-link
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>&lt;a href=&quot;#/app/privacy&quot;&gt; </span></pre></div> </td></tr></table>
angular, ionic

Text only

Ionic Disable back button

1
2
3
4
5
$ionicHistory.nextViewOptions({
  disableBack: true,
  disableAnimate: true
});
$state.go('app.home');
https://snipt.net/embed/b8571b32a28c397df7834852239ac1f5/
https://snipt.net/raw/b8571b32a28c397df7834852239ac1f5/
b8571b32a28c397df7834852239ac1f5
text
Text only
6
2016-12-10T00:05:43
True
False
False
Jun 22, 2016 at 12:22 AM
/api/public/snipt/147270/
ionic-disable-back-button
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>$ionicHistory.nextViewOptions({ </span><span id="L-2"><a name="L-2"></a> disableBack: true, </span><span id="L-3"><a name="L-3"></a> disableAnimate: true </span><span id="L-4"><a name="L-4"></a>}); </span><span id="L-5"><a name="L-5"></a>$state.go(&#39;app.home&#39;); </span></pre></div> </td></tr></table>
ionic

Text only

Angular Ajax post to PHP

1
2
3
4
5
$headers = apache_request_headers();
if (empty($headers['Content-Length'])) exit;

$input = file_get_contents('php://input');
$post_object = json_decode($input);
https://snipt.net/embed/025b58161eb18a6417782d4d290f23a4/
https://snipt.net/raw/025b58161eb18a6417782d4d290f23a4/
025b58161eb18a6417782d4d290f23a4
text
Text only
6
2016-12-10T07:41:19
True
False
False
/api/public/snipt/146985/
angular-ajax-post-to-php
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>$headers = apache_request_headers(); </span><span id="L-2"><a name="L-2"></a>if (empty($headers[&#39;Content-Length&#39;])) exit; </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>$input = file_get_contents(&#39;php://input&#39;); </span><span id="L-5"><a name="L-5"></a>$post_object = json_decode($input); </span></pre></div> </td></tr></table>
angular, ionic
Copyrighted, illegal, or inappropriate content? Email [email protected].