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
<!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> |
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
<!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> |
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
<!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> |
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
<!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; |
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
<!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"> |
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
<!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; |
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
(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'; |
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
(function() { | |
'use strict'; | |
angular.module('app-filters', []); | |
angular.module('app-filters').filter('cpf', function() { | |
return function(input) { | |
var str = input + ''; | |
if(str.length <= 11){ | |
str = str.replace(/\D/g, ''); | |
str = str.replace(/(\d{3})(\d)/, "$1.$2"); |
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
{ | |
"name": "bower-exemplo", | |
"version": "0.0.0", | |
"homepage": "https://github.com/gabrielfeitosa/blog_exemplos", | |
"authors": [ | |
"Gabriel Feitosa <[email protected]>" | |
], | |
"description": "", | |
"main": "", | |
"moduleType": [], |
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
(function() { | |
angular.module("app") | |
.factory("ChatFactory", function($http, $timeout) { | |
var promise; | |
var URL = "http://gf-chat.herokuapp.com/rest/mensagens/"; | |
var mensagens = []; | |
var aberto = false; | |
var contador = 5; | |
return { |
OlderNewer