Skip to content

Instantly share code, notes, and snippets.

View axeldeveloper's full-sized avatar
🏠
Working from home

Axel Alexander axeldeveloper

🏠
Working from home
View GitHub Profile
angular.module('appPortal.DataStore', [])
.factory('DataStore', function() {
var noticias = angular.fromJson(window.localStorage['noticias'] || '[]');
function persist() {
window.localStorage['noticias'] = angular.toJson(noticias);
}
return {
angular.module('appPortal.ApiServico' , [])
.factory('CrudFactory', function($http, UrlApi) {
var config = {
headers: {
'Access-Control-Allow-Origin' : '*',
'Access-Control-Allow-Methods' : 'POST, GET, OPTIONS, PUT',
'Content-Type': 'application/json',
'Content-Type': 'application/x-www-form-urlencoded;charset=utf-8;',
'Accept': 'application/json'
}
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {