ng-fukuoka #1
@laco0416
What's the Full-Stack?
@Component({
template: "<h1>{{title}}</h1>"
})
class MyComponent {
title = "Hello!";
}
<h1>Hello!</h1>
@Injectable()
export class HeroService {
constructor (private http: Http) {}
getHeroes (): Observable<Hero[]> {
return this.http.get("/api/heroes")
.map(resp => resp.json());
}
}
@Component({ animations: [ trigger("visibility", [ state("shown", style({ opacity: 1 })), state("hidden", style({ opacity: 0 })), transition("* => *", animate(".5s")) ]) ] }) class MyComponent() { ... }
AngularConnect 2016
For Debugging
Detect errors at build-step
AngularConnect 2016
For templates
AngularConnect 2016
For templates
@angular/language-service
@NgModule({
providers: [
MyService,
{ provide: MyService, useClass: MyService },
{ provide: MyService, useValue: new MyService() },
{ provide: MyService, useFactory: () => new MyService() },
],
})
class AppModule {}
Token
Instance
@Component({
selector: "my-component"
})
class MyComponent {
constructor(myService: MyService) {
}
}
Token
Instance
Angular << Modern Web
"The Web has moved.
Frameworks must move"