Angular 2 @ JS Ojisan #6-3

Ca0ab6e450f894e06652ee257df9d647?s=47 Shuhei Kagawa
December 17, 2015

Angular 2 @ JS Ojisan #6-3

JS オジサン #6-3 での Angular 2 のざっくりした紹介です。
https://atnd.org/events/71991

Ca0ab6e450f894e06652ee257df9d647?s=128

Shuhei Kagawa

December 17, 2015
Tweet

Transcript

  1. 2.

    ߳઒ पฏ > Rails, Angular, Node ͳͲͷΦδαϯ @M3, Inc. 10k

    LOC Angular App > GitHub, npm, Qiita @shuhei > Twitter @shuheikagawa > Ϗʔϧݕఆ 2 ڃ !
  2. 4.
  3. 5.

    !

  4. 10.
  5. 12.

    TYPESCRIPT @Component({ selector: 'hello-world', template: '<p>{{ greeting }}, {{ name

    }}!</p>', inputs: ['greeting', 'name'] }) export class HelloWorld {}
  6. 14.

    SCOPED CSS // my-app.ts @Component({ // ... templateUrl: 'my-app.html', styleUrls:

    ['my-app.css'] }) export class MyApp {} /* my-app.css */ h3 { margin: 2rem 0; }
  7. 17.
  8. 18.
  9. 19.
  10. 23.
  11. 26.
  12. 27.

    ίʔυ @Component({ selector: 'my-app', templateUrl: 'app/my-app.html', styleUrls: ['app/my-app.css'] }) export

    class MyApp { searchText = new Control(); repos: any; constructor(private github: GitHubService) { this.repos = this.searchText.valueChanges .debounceTime(300) .flatMap(text => this.github.search(text)); } }
  13. 28.

    <h3>GitHub repositoy search</h3> <p> <input [ngFormControl]="searchText" placeholder="keyword" class="form-control"> </p> <ul

    class="repositories"> <li *ngFor="#repo of repos | async"> <a [href]="repo.html_url">{{repo.full_name}}</a> {{repo.stargazers_count}} stars </li> </ul>
  14. 31.

    ඈͼಓ۩ʂ > DOM ૢ࡞Ҏ֎͕ Web Worker Ͱಈ͘ʂ > αʔόαΠυϨϯμϦϯάʂ Angular

    Universal > ωΠςΟϒΞϓϦʂ React Native, NativeScript
  15. 34.

    $ ng new js-ojisan $ cd js-ojisan $ ls -l

    total 32 drwxr-xr-x 10 shuhei staff 340 Dec 16 11:44 dist -rw-r--r-- 1 shuhei staff 200 Dec 16 09:44 ember-cli-build.js -rw-r--r-- 1 shuhei staff 1282 Dec 16 09:44 karma-test-shim.js -rw-r--r-- 1 shuhei staff 1365 Dec 16 09:44 karma.conf.js drwxr-xr-x 17 shuhei staff 578 Dec 16 09:44 node_modules -rw-r--r-- 1 shuhei staff 571 Dec 16 09:44 package.json drwxr-xr-x 7 shuhei staff 238 Dec 16 09:44 src drwxr-xr-x 26 shuhei staff 884 Dec 16 21:16 tmp $ ng serve $ open http://localhost:4200
  16. 38.

    > Angular 2: One framework > AngularClass/awesome-angular2 - GitHub >

    AngularConnect 2015 Videos - Youtube > Angular 2 Advent Calendar 2015 - Qiita
  17. 39.
  18. 40.
  19. 41.

    CREDITS > Angular: One framework > Comparing Performance of Blaze,

    React, Angular-Meteor and Angular 2 with Meteor by Shawn McKay > snack by liz west