Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Angular - FEMUG AM 4 - Jaime Neves
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Femug
June 24, 2017
Technology
68
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Angular - FEMUG AM 4 - Jaime Neves
Femug
June 24, 2017
More Decks by Femug
See All by Femug
Sass - FEMUGAM 4 - Diego Lucena
femugam
0
68
Other Decks in Technology
See All in Technology
Webの常識が通じないHTMLメールのダークモード
teamlab
PRO
0
130
M5Stackで作る BLEマウス GPSログの世界
tomokusaba
0
430
Kiro Crewをはじめよう
kizawa2020
1
160
PagerDuty Tech Hub-鳴らすけれど、人は動かない
ezaki
0
170
re:Invent初参加で変わったこと、2回目にやってみたいこと(JAWS-UG彩の国埼玉 #12)
mhrtech
2
230
ブラウザとサーバーから考えるAI時代のフロントエンド監視
shogo4131
3
940
オントロジーって 結局なにもの? AI エージェントに「意味」を渡す知識設計の話
greenmidori
0
210
USB PDを使ってスマホを労わりたい
raspython3
0
180
1つのリクエストを追って理解する - llm-dのP/D分離
akhino
1
160
Code for Security プロジェクト紹介 2026年10月
yu23ki14
0
110
しろおびから始める!ログ活用の第一歩
shumei_ito
0
950
専門領域のAIをどう評価するか
bengo4com
2
170
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
630
The Mindset for Success: Future Career Progression
greggifford
PRO
0
540
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
280
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
18k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
Mobile First: as difficult as doing things right
swwweet
225
10k
Speed Design
sergeychernyshev
33
2.2k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Marketing to machines
jonoalderson
1
5.9k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
570
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