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
<html data-ng-app=""> | |
<head> | |
<title>NGREPEAT Versao 1.0</title> | |
</head> | |
<body> | |
<div class="container" data-ng-init="amigos =['EU' , 'VOCE' , 'ELE' , 'ELA']"> | |
<ul> | |
<li data-ng-repeat='amg in amigos'> {{ amg }}</li> | |
</ul> | |
</div> |
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
<html ng-app> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.4/angular.js"></script> | |
<script> | |
var MeuController = function($scope, $http) { | |
$http.get('https://api.github.com/repos/angular/angular.js/commits') | |
.success(function(commits) { | |
$scope.commits = commits | |
}) |
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> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript"> | |
app = angular.module("app", []); | |
app.controller('MainCtrl', function($scope, conf) { | |
$scope.conf = conf; |
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> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript"> | |
app = angular.module("app", []); | |
app.controller('MainCtrl', function($scope, conf) { | |
$scope.conf = conf; |
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> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript"> | |
app = angular.module("app", []); | |
app.controller('MainCtrl', function($scope, config) { | |
$scope.config = config; |
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
<html ng-app='AngularIntro'> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
</head> | |
<body ng-controller='SimpleController'> | |
<input type='text' ng-model='name'> | |
<input type='button' value='Adicionar' ng-click='addName()'> | |
<table> |
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 ContatoController($scope) { | |
$scope.contatos = ["renato", "astrogildo"]; | |
$scope.adicionar = function() { | |
$scope.contatos.push($scope.novo); | |
$scope.novo = ""; | |
} | |
} |
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> | |
<title>TRABALHANDO COM CONTROLLERS</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> | |
<script type="text/javascript" src="contatos.js"> </script> | |
</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> | |
<!-- diretiva ng-app --> | |
<html ng-app="diretivasAng"> | |
<head> | |
<meta charset="utf-8" /> | |
<title> Diretivas</title> | |
<script> | |
document.write('<base href="' + document.location + '" />'); |
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
var mvcApp = angular.module('diretivasAng', []); | |
mvcApp.controller('dirController', function dirController($scope) { | |
$scope.frutas = [ | |
{name:'Maça'}, | |
{name:'Uva'}, | |
{name:'Jaca'} | |
]; |