Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Angular - FEMUG AM 4 - Jaime Neves
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Femug
June 24, 2017
Technology
0
63
Angular - FEMUG AM 4 - Jaime Neves
Femug
June 24, 2017
Tweet
Share
More Decks by Femug
See All by Femug
Sass - FEMUGAM 4 - Diego Lucena
femugam
0
59
Other Decks in Technology
See All in Technology
AIエージェントに必要なのはデータではなく文脈だった/ai-agent-context-graph-mybest
jonnojun
1
240
今こそ学びたいKubernetesネットワーク ~CNIが繋ぐNWとプラットフォームの「フラッと」な対話
logica0419
4
330
Cosmos World Foundation Model Platform for Physical AI
takmin
0
960
ブロックテーマでサイトをリニューアルした話 / 2026-01-31 Kansai WordPress Meetup
torounit
0
480
SREチームをどう作り、どう育てるか ― Findy横断SREのマネジメント
rvirus0817
0
340
小さく始めるBCP ― 多プロダクト環境で始める最初の一歩
kekke_n
1
550
22nd ACRi Webinar - NTT Kawahara-san's slide
nao_sumikawa
0
100
Cloud Runでコロプラが挑む 生成AI×ゲーム『神魔狩りのツクヨミ』の裏側
colopl
0
130
AI駆動開発を事業のコアに置く
tasukuonizawa
1
360
Greatest Disaster Hits in Web Performance
guaca
0
280
広告の効果検証を題材にした因果推論の精度検証について
zozotech
PRO
0
210
私たち準委任PdEは2つのプロダクトに挑戦する ~ソフトウェア、開発支援という”二重”のプロダクトエンジニアリングの実践~ / 20260212 Naoki Takahashi
shift_evolve
PRO
2
180
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.2k
エンジニアに許された特別な時間の終わり
watany
106
230k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
200
Making the Leap to Tech Lead
cromwellryan
135
9.7k
WCS-LA-2024
lcolladotor
0
450
Navigating Weather and Climate Data
rabernat
0
110
Writing Fast Ruby
sferik
630
62k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
The SEO identity crisis: Don't let AI make you average
varn
0
330
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
220
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
380
Transcript
Angular 4º FEMUG - AM Jaime Neves @dejaneves
Jaime Neves @dejaneves Hi, I’m a Front-end Develop passionate about
web and everything related to it. I’m currently working building products with JavaScript at Apassos. jaimeneves.com.br
Empregos Manaus CheckForce.js FieldDrop.js PROJETOS Grupos Front End Manaus FEMUG
- AM IONIC Brazil LookBack.io
Agenda Angular CLI Metadata Module Components/Directives Templates Data Binding Services
Dependency Injection
One framework Mobile & desktop
Angular em toda parte
Cross-Platform Development Electron Ionic Native Script React Native Windows (UWP)
Angular-CLI
Angular CLI Example
Metadata Informa para o Angular como processar uma Class
Metadata - src/app/hero-list.component.ts (class) export class HeroListComponent implements OnInit {
heroes: Hero[]; selectedHero: Hero; constructor(private service: HeroService) { } ngOnInit() { this.heroes = this.service.getHeroes(); } selectHero(hero: Hero) { this.selectedHero = hero; } } Metadata
Metadata - src/app/hero-list.component.ts (metadata) @Component({ selector: 'hero-list', templateUrl: './hero-list.component.html', providers:
[ HeroService ] }) export class HeroListComponent implements OnInit { /* . . . */ } Decorator @Component
MODULE App Angular é modular; Root Module (AppModule); Feature Modules
Module
Module - src/app/app.module.ts import { NgModule } from '@angular/core'; import
{ BrowserModule } from '@angular/platform-browser'; @NgModule({ imports: [ BrowserModule ], providers: [ Logger ], declarations: [ AppComponent ], exports: [ AppComponent ], bootstrap: [ AppComponent ] }) export class AppModule { }
Module - src/app/app.module.ts imports: Other Modules, providers: Services, declarations: View
Class [Components, Directives and Pipes], exports: [The subset of declarations], bootstrap: [ The main application view ]
Module - src/app/app.module.ts import { Component } from '@angular/core'; @Component({
selector:'my-app', template:` <h1>{{title}}</h1> <nav> <a routerLink="/dashboard" >Dashboard</a> <a routerLink="/heroes" >Heroes</a> </nav> <router-outlet></router-outlet> `, styleUrls:['./app.component.css'] }) export class AppComponent { title = 'Tour of Heroes'; }
Module - src/main.ts import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import
{ AppModule } from './app/app.module'; platformBrowserDynamic().bootstrapModule(AppModule); Inicie o “root module” https://angular.io/generated/live-examples/ngmodule/minimal.0.eplnkr.html
Module Example
Components/Directives
Componentes Componente controle parte de um código HTML In Angular,
“everything is a component.”
Componentes - src/app/hero-list.component.ts (class) @Component({selector: 'greet', template: 'Hello {{name}}!'}) class
Greet { name: string = 'World'; } A component has a lifecycle managed by Angular.
Templates Gerencia o que o usuário ver e pode fazer
Templates - src/app/hero-list.component.html <h2>Hero List</h2> <p><i>Pick a hero from the
list</i></p> <ul> <li *ngFor="let hero of heroes" (click)="selectHero(hero)"> {{hero.name}} </li> </ul> <hero-detail *ngIf="selectedHero" [hero]="selectedHero"></hero-detail>
Templates
Data Binding
Data Binding Data Binding sem Framework Lógica de push/pull à
mão Experiência com jQuery
Data Binding - src/app/hero-list.component.html (binding) <li>{{hero.name}}</li> <hero-detail [hero]="selectedHero"></hero-detail> <li (click)="selectHero(hero)"></li>
Interpolation property binding event binding
Data Binding - src/app/hero-detail.component.html (ngModel) <input [(ngModel)]="hero.name"> vinculação de propriedades
e eventos
Data Binding (ngModel) Example
Services
Services Categoria Ampla Quase Tudo Pode ser um Serviço Sem
Definição no Angular Componentes Limpos Decorator @Injectable() Arquivo “.service.ts”
Services import { Injectable } from '@angular/core'; @Injectable() export class
HeroService { /* . . . */ }
Services Example
Dependency injection
Dependency injection
Dependency injection constructor(private service: HeroService) { }
Dependency injection src/app/app.module.ts (module providers) Registered a provider providers: [
BackendService, HeroService, Logger ],
Dependency injection src/app/hero-list.component.ts (component providers) Registered a provider @Component({ selector:
'hero-list', templateUrl: './hero-list.component.html', providers: [ HeroService ] })
Obrigado !!! Jaime Neves @dejaneves