Skip to content

Instantly share code, notes, and snippets.

Avatar

Juarez Filho juarezpaf

View GitHub Profile
@juarezpaf
juarezpaf / package.json
Created Apr 18, 2018
CLI 6.0.0-rc.5 + Angular v5
View package.json
{
"name": "firelist",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
View users.json
[
{
"id": 1,
"name": "Juarez Filho",
"username": "juarezpaf",
"email": "juarezpaf@gmail.com",
"picture": "https://randomuser.me/api/portraits/thumb/men/1.jpg",
"gift": "Google Pixel",
"quote": "Technology is anything that wasn’t around when you were born",
"address": {
View gdgmaceio-workshop-exercicio.html
<ion-header>
<ion-navbar color="primary">
<ion-title>{{ selectedEvent.title }}</ion-title>
<ion-buttons end>
<!--@TODO: Mostrar apenas se o usuário for admin-->
<button ion-button icon-only (click)="pushToEventSettingsPage(selectedEvent)">
<ion-icon name="settings"></ion-icon>
</button>
<!--@TODO: Utilizar o plugin cordova-plugin-x-socialsharing-->
View app-models.d.ts
declare module 'api/models/app-models' {
interface Chat {
id?: string;
title?: string;
picture?: string;
lastMessage?: Message;
}
interface Event {
$key?: string;
View create-extraordinary-apps-with-firebase.md
View post_route.js
App.PostRoute = Em.Route.extend({
model: function(params) {
return Em.$.ajax({
type: 'GET',
url: App.API+'/post/'+ params.post_id,
dataType: 'json',
contentType: 'application/json',
context: this
}).then(function(json) {
if (json.status.code === 200) {//API return status code with success or errors
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Ember.js Router Example</title>
<meta name="description" content="Example of a basic Ember.js application with a Router" />
<meta name="author" content="http://codebrief.com" />
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
View gist:6240940

WARNING

This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>
View pickadate.js
App.PickADate = Ember.View.extend({
attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort',
'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today',
'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector',
'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'],
events: ['onOpen', 'onClose', 'onSelect', 'onStart'],
tagName: 'input',
classNames: 'pickadate',
View pickadate.js
App.PickADate = Ember.View.extend({
attributes: ['monthsFull', 'monthsShort', 'weekdaysFull', 'weekdaysShort',
'monthPrev', 'monthNext', 'showMonthsFull', 'showWeekdaysShort', 'today',
'clear', 'format', 'formatSubmit', 'hiddenSuffix', 'firstDay', 'monthSelector',
'yearSelector', 'dateMin', 'dateMax', 'datesDisabled', 'disablePicker'],
events: ['onOpen', 'onClose', 'onSelect', 'onStart'],
tagName: 'input',
classNames: 'pickadate',
You can’t perform that action at this time.