Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Angular v7 について

puku0x
November 09, 2018

Angular v7 について

Angular触ろうの会 in Fukuoka #7 LT
https://ng-fukuoka.connpass.com/event/106685/

puku0x

November 09, 2018
Tweet

More Decks by puku0x

Other Decks in Technology

Transcript

  1. Angular v7 • 依存関係の更新 ◦ TypeScript 3.1 ◦ RxJS 6.3

    ◦ Node.js 10対応 • ツール群と周辺ライブラリの更新
  2. CLI

  3. CLI Prompts $ ng new my-app ? Would you like

    to add Angular routing? Yes ? Which stylesheet format would you like to use? (Use arrow keys) ❯ CSS SCSS [ http://sass-lang.com ] SASS [ http://sass-lang.com ] LESS [ http://lesscss.org ] Stylus [ http://stylus-lang.com ]
  4. x-prompt schematic "routing": { "type": "boolean", "description": "Generates a routing

    module.", "default": false, "x-prompt": "Would you like to add Angular routing?" },
  5. Bundle budgets "budgets": [{ "type": "initial", "maximumWarning": "2mb", "maximumError": "5mb"

    }] バンドル単位, %設定も可 { "type": "bundle", "name": "main", "baseline": "300kb", "maximumWarning": “10%" }
  6. Angular Material / CDK v7 • 新Material Design対応 • 新機能

    ◦ バーチャルスクロール ◦ ドラッグ&ドロップ
  7. ngDoBootstrap export class AppModule implements DoBootstrap { constructor(injector: Injector) {

    const el = createCustomElement(HelloComponent, { injector }); customElements.define('app-hello', el); } ngDoBootstrap(appRef: ApplicationRef) {} } 明示的にInterfaceを 指定するようになった ※ ビルドの際は tsconfig.json で "target": "es2015" の指定が必要
  8. Router • GuardのリダイレクトにUrlTree指定可 @Injectable() export class AuthGuard implements CanActivate {

    canActivate(router: Router, route: ActivatedRouteSnapshot, state: RouterStateSnapshot) { return router.parseUrl('/login'); // false返さなくてもOK! } }
  9. Ivy

  10. v7のエイプリルフールネタ • A new ng-compiler ◦ ビルドサイズが10バイトとか無理 • Splitting of

    @angular/core ◦ コアが418個に分割される、DDoSか • @aiStore – A built-in AI-powered store solution ◦ そんなものはない • @angular/mine ◦ あかんやつ