This file contains 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
module.exports = { | |
index: function (req,res) { | |
//empty object hold the data | |
var viewData = {} | |
viewData.user = req.user; | |
File.find( function foundFiles(err, files) { |
This file contains 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
//sample Foo service. | |
//$http is angular's version of jq's $.ajax() | |
angular.module('testApp').factory('Foo',function($http){ | |
//public Foos interface | |
return { | |
This file contains 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 uuid = require('node-uuid') | |
module.exports = { | |
connection : ['mcguffy_mccloud2'], | |
migrate : 'alter', | |
attributes: { | |
This file contains 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
.factory('FavorStore',function($q,$firebase,FireBase,UserAuth,fireBaseUrl){ | |
var deferredStore = $q.defer() | |
var user = UserAuth.getLoggedInUser() | |
user.then(function(user){ |
This file contains 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
myApp.factory('ChromeMessaging',function($rootScope){ | |
var port = chrome.runtime.connect({name: "knockknock"}); | |
var _localMessageStorage = [] | |
function _sendMessage(message){ | |
port.postMessage(message); | |
} | |
This file contains 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
myApp.factory('dataThing',function($q,$http){ | |
var thatData = null; | |
return { | |
getData : function(){ | |
//create a promise | |
var deferredData = $q.defer() |
This file contains 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
app.factory('chromeAPI',function($rootScope){ | |
//native API! | |
chrome.runtime.onMessage.addListener(function(message,sender,response){ | |
$rootScope.broadcast('chrome:message',message,sender,response) | |
}) | |
function authenticateViaGoogle(){ |
This file contains 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
app.factory('chromeAuth',function(){ | |
var _isLoggedIn = false; | |
rome.runtime.onMessage.addListener(function(message,sender,respond){ | |
if(message == 'logged_in'){ | |
_isLoggedIn = true; | |
} |
This file contains 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
app.factory('chromeAccountProxy',function(){ | |
var _localAccounts = [] | |
var _isLoggedIn = false; | |
function sendMessage(message){ | |
chrome.extension.sendMessage(message) | |
} |
This file contains 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('innit.app',['ionic','innit.auth','innit.storage']) | |
.provider('$innitApp',function(){ | |
var _appConfig = { | |
baseUrl : 'http://localhost:1337' | |
} | |
var _appState = { | |
stateDescription : null | |
} |