Mais conteúdo relacionado Semelhante a Angular JS, você precisa conhecer (20) Angular JS, você precisa conhecer5. HTML
<html>
<form> <title>
<tr>
<ul>
<span> <option>
<td>
<input>
<a>
<br> <em> <table>
<script>
<strong> <legend>
<div>
<select> <button>
<textarea>
6. <html> <video>
<header>
<form> <title>
<tr> <canvas>
<ul>
<span> <option>
<td> <audio>
<input>
<a>
<br> <em> <section>
<script> <table>
<meter>
<strong> <legend>
<div> <menu>
<select> <button> <hgroup>
<textarea> <progress>
7. <ng-view> <ng-switch>
<html> <video>
<header>
<form> <title>
<tr> <canvas>
<ul>
<span> <option>
<td> <audio>
<input>
<a>
<br> <em> <section>
<script> <table>
<meter>
<strong> <legend>
<div> <menu>
<select> <button> <hgroup>
<textarea> <progress>
<minha-tag> ng-model=""
8. <body ng-app>
platéia
<input ng-model="nome">
<p>Olá, {{nome}}!</p> Olá, platéia!
<script href="angular.js"/>
</body>
9. <body ng-app>
<input ng-model="nome">
<p>Olá, {{nome}}!</p>
<script href="angular.js"/>
</body>
10. <body ng-app>
<input ng-model="nome">
<p>Olá, {{nome}}!</p>
<script href="angular.js"/>
</body>
11. <body ng-app>
<input ng-model="nome">
<p>Olá, {{nome}}!</p>
<script href="angular.js"/>
</body>
14. <body ng-app>
<div ng-controller="SorteadorController">
<button ng-click="sortearNumero()">
fazer sorteio!
</button>
<p>O número sorteado foi: {{numero}}</p>
</div>
<script href="angular.js"/>
<script href="sorteador-controller.js"/>
</body>
15. <body ng-app>
<div ng-controller="SorteadorController">
<button ng-click="sortearNumero()">
fazer sorteio!
</button>
<p>O número sorteado foi: {{numero}}</p>
</div>
<script href="angular.js"/>
<script href="sorteador-controller.js"/>
</body>
16. <body ng-app>
<div ng-controller="SorteadorController">
<button ng-click="sortearNumero()">
fazer sorteio!
</button>
<p>O número sorteado foi: {{numero}}</p>
</div>
<script href="angular.js"/>
<script href="sorteador-controller.js"/>
</body>
17. <body ng-app>
<div ng-controller="SorteadorController">
<button ng-click="sortearNumero()">
fazer sorteio!
</button>
<p>O número sorteado foi: {{numero}}</p>
</div>
<script href="angular.js"/>
<script href="sorteador-controller.js"/>
</body>
20. MVC
<ul>
<li ng-repeat="usuario in usuarios">
{{usuario.id}} - {{usuario.nome}}
</li>
</ul>
32. window.appTalk
.controller('SobreController', [
'$scope',
function ($scope){
... código do controller ...
}
]);
34. window.appTalk
.service('ServicoNecessario',
function (){
this.funcionalidade = function ()
{...};
... código do serviço ...
});
38. window.appTalk = angular
.module('appTalk', [])
.config(['$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/sobre', {
templateUrl: 'sobre.html',
controller: 'SobreController'
})
.when('/home', {
templateUrl: 'home.html',
controller: 'HomeController'
})
.otherwise({redirectTo: '/home});
}]);
39. window.appTalk = angular
.module('appTalk', [])
.config(['$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/sobre', {
templateUrl: 'sobre.html',
controller: 'SobreController'
})
.when('/home', {
templateUrl: 'home.html',
controller: 'HomeController'
})
.otherwise({redirectTo: '/home});
}]);
40. window.appTalk = angular
.module('appTalk', [])
.config(['$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/sobre', {
templateUrl: 'sobre.html',
controller: 'SobreController'
})
.when('/home', {
templateUrl: 'home.html',
controller: 'HomeController'
})
.otherwise({redirectTo: '/home});
}]);
41. window.appTalk = angular
.module('appTalk', [])
.config(['$routeProvider',
function ($routeProvider) {
$routeProvider
.when('/sobre', {
templateUrl: 'sobre.html',
controller: 'SobreController'
})
.when('/home', {
templateUrl: 'home.html',
controller: 'HomeController'
})
.otherwise({redirectTo: '/home});
}]);
46. Serviço
APP Controller
diretivas scope
<view>
filters
47. Serviço
$injector
APP Controller
diretivas
<view>
filters
48. E - Elemento:
<my-directive></my-directive>
A - Atributo:
<div my-directive="exp"> </div>
C - Classe:
<div class="my-directive: exp;"></div>
M - Comentário:
<!-- directive: my-directive exp -->
53. window.appTalk.directive(
'directiveName', function factory(injectables) {
var definicaoDeDiretiva = {
priority: 0,
template: '<div></div>',
templateUrl: 'directive.html',
replace: false,
transclude: false,
restrict: 'A',
scope: false,
compile: function compile(tElement, tAttrs, transclude) {
return {
pre: function preLink() { ... },
post: function postLink() { ... }
}
},
link: function postLink(scope, iElement, iAttrs) { ... }
};
return definicaoDeDiretiva;
});