Skip to content

Instantly share code, notes, and snippets.

View gabrielfeitosa's full-sized avatar
🖥️

Gabriel Feitosa gabrielfeitosa

🖥️
View GitHub Profile
@gabrielfeitosa
gabrielfeitosa / animal.detalhe.controller.js
Last active September 11, 2015 00:25
AngularJS: Rotas (ngRoute)
(function() {
'use strict';
angular.module('feira-app')
.controller('AnimalDetalheController', AnimalDetalheController);
AnimalDetalheController.$inject = ['$scope', '$routeParams', 'AnimalFactory'];
function AnimalDetalheController($scope, $routeParams, AnimalFactory) {
$scope.titulo = 'Detalhe do Animal';
@gabrielfeitosa
gabrielfeitosa / service_fofoqueiro.html
Last active August 29, 2015 14:27
AngularJS: Criando Service
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Blog do Gabriel Feitosa</title>
<style type="text/css">
button {
background-color: red;
color: white;
font-weight: bold;
@gabrielfeitosa
gabrielfeitosa / service_alert.html
Last active August 29, 2015 14:27
Utilizando Services no AngularJS
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Blog do Gabriel Feitosa</title>
</head>
<body>
<h1>Usando o service $window</h1>
<!--Declaração do controlador AlertController e definição do nome que será usado para utilização 'ctrl'-->
<div ng-controller="AlertController as ctrl">
@gabrielfeitosa
gabrielfeitosa / controller_heranca.html
Last active August 29, 2015 14:27
Entendendo os Controladores - Herança de $scope
<!DOCTYPE html>
<!--Declaração do módulo da aplicação-->
<html ng-app="app">
<head>
<meta charset="utf-8"/>
<title>Exemplo 3 - Blog do Gabriel Feitosa</title>
<style type="text/css">
div.heranca div {
padding: 5px;
border: solid 2px #000;
@gabrielfeitosa
gabrielfeitosa / controller2.html
Last active August 29, 2015 14:27
Iniciando com Controller no AngularJS - Adicionando comportamento ao $scope
<!DOCTYPE html>
<html ng-app="app">
<head>
<meta charset="utf-8" />
<title>Exemplo 2 - Blog do Gabriel Feitosa</title>
</head>
<body>
<h1>Entendendo os Controladores</h1>
@gabrielfeitosa
gabrielfeitosa / controller1.html
Last active August 29, 2015 14:27
Iniciando com Controller no AngularJS
<!DOCTYPE html>
<!--Declaração do módulo da aplicação-->
<html ng-app="app">
<head>
<meta charset="utf-8">
<title>Exemplo 1 - Blog do Gabriel Feitosa</title>
</head>
<body>
@gabrielfeitosa
gabrielfeitosa / nome.html
Last active August 29, 2015 14:26
Exemplo inicial AngularJS
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="utf-8">
</head>
<body>
<input type="text" ng-model="nome" placeholder="Diz teu nome aí">
<h1>Eita {{nome}}, olha o two-way data binding funcionando!</h1>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.3/angular.min.js"></script>