This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp', ['ionic']) | |
.config(function($ionicNavProvider)) { | |
$ionicNavProvider.url('/contact/:contactId', { | |
templateUrl: 'contact.html', | |
controller: 'ContactCtrl', | |
extra: {} | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp.directives', []) | |
.directive('myCanvas', function() { | |
return { | |
// Angular needs to know what type of usage we want to allow for this (attribute, class name, or tag). | |
// For this example, a tag is great. | |
restrict: 'E', | |
// We want to replace the original custom tag with a template | |
replace: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('myApp.services', []) | |
.factory('Camera', ['$q', function($q) { | |
return { | |
getPicture: function() { | |
var q = $q.defer(); | |
navigator.camera.getPicture(function(imageURI) { | |
// Do any magic you need |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="container"> | |
<h2>Also included in every plan</h2> | |
<div class="row"> | |
<div class="col-6 col-lg-3"> | |
<h4>Team Collaboration</h4> | |
</div> | |
<div class="col-6 col-lg-3"> | |
<h4>Live Preview</h4> | |
</div> | |
<div class="col-6 col-lg-3"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use client to interact with Force.com platform | |
client.create("Account", { "Name" : "blerg3" }, | |
function(response) { | |
console.log(response); | |
alert("Object successfully created."); | |
}, | |
function(errorXhr) { | |
if (errorXhr.status == 401) { | |
// Invalid access token |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import web | |
urls = ("/.*", "hello") | |
app = web.application(urls, globals()) | |
class hello: | |
def GET(self): | |
return 'Hello, world!' | |
if __name__ == "__main__": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ref = new Firebase("https://YOUR_FIREBASE_NAME.firebaseio.com/"); | |
ref.child("meta").once("value", function(snapshot) { | |
$("#feed > :first").html(snapshot.val().description); | |
}); | |
ref.child("articles").limit(10).on("child_added", function(snapshot) { | |
var article = snapshot.val(); | |
var link = $("<a>", {"href": article.link, "target": "_blank"}); | |
$("#feed").append($("<li>").append(link.html(article.title))); | |
$('#feed').listview('refresh'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
layout: default | |
title: Welcome | |
--- | |
<div class="page-header"> | |
<h1>Jetstrap Docs</h1> | |
</div> | |
Welcome! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).on "click", "a[href^='/']", (event) -> | |
href = $(event.currentTarget).attr('href') | |
# Check if the link matches our route | |
passThrough = href.indexOf('/dash') != 0 | |
# Allow shift+click for new tabs, etc. | |
if !passThrough && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey | |
event.preventDefault() |