Skip to content

Instantly share code, notes, and snippets.

View leosilvadev's full-sized avatar
🇩🇪
"Simplicity is the ultimate sophistication" - Leonardo da Vinci

Leonardo Silva leosilvadev

🇩🇪
"Simplicity is the ultimate sophistication" - Leonardo da Vinci
  • Vivy GmbH
  • Berlin, Germany
View GitHub Profile
@leosilvadev
leosilvadev / .vimrc
Created June 30, 2015 01:49
My vim configuration file :)
let mapleader=','
set wildmenu
set wildmode=list:longest,full
set number
set cursorline
set tabstop=3
set shiftwidth=3
set softtabstop=3
set t_Co=256
syntax on
<DOCTYPE html>
<html ng-app="contador">
<head></head>
<body>
<section ng-controller="ContadorController">
<input ng-model="numero1" type="number">
<input ng-model="numero2" type="number">
<span>{{numero1+numero2}}</span>
</section>
<script src="angular.min.js"></script>
<DOCTYPE html>
<html ng-app="contador">
<head></head>
<body>
<section ng-controller="ContadorController">
<input ng-model="numero1" type="number" ng-change="calcula()">
<input ng-model="numero2" type="number" ng-change="calcula()">
<select ng-model="operacao" ng-options="op for op in operacoesDisponiveis" ng-change="calcula()">
</select>
<span>{{resultado}}</span>
<DOCTYPE html>
<html ng-app="contador">
<head>
<style>
@IMPORT url("bootstrap-3.3.6-dist/css/bootstrap.min.css");
</style>
</head>
<body>
<div class="container">
<div class="row" ng-controller="ContadorController" ng-init="calcula()">
<DOCTYPE html>
<html ng-app="usuarios">
<head>
<style>
@IMPORT url("bootstrap-3.3.6-dist/css/bootstrap.min.css");
</style>
</head>
<body>
<div class="container">
<div class="row" ng-controller="UsuariosController">
angular.module('usuarios', []);
var modulo = angular.module('usuarios');
modulo.controller('UsuariosController', function($scope, usuarios){
$scope.usuario = {};
$scope.usuarios = usuarios.listar();
$scope.textoPequisa = '';
$scope.adicionar = function(usuario){
var modulo = angular.module('usuarios');
modulo.factory('usuarios', function(){
var usuarios = [];
var adicionar = function(usuario){
usuarios.push(usuario);
};

Story: ID

Status

Developemnt/Done

Migrations

YES | NO

Description

...

var modulo = angular.module('rh');
modulo.controller('EmployeesController', function($scope, rhManager){
$scope.loadEmployees = function(){
$scope.employees = rhManager.list();
};
$scope.loadEmployees();