angular-cn/packages/compiler
Matias Niemelä 693045165c refactor(ivy): remove def.attributes in favor of the `elementHostAttrs` instruction (#28089)
Up until this point, all static attribute values (things like `title` and `id`)
defined within the `host` are of a Component/Directive definition were
generated into a `def.attributes` array and then processed at runtime.
This design decision does not lend itself well to tree-shaking and is
inconsistent with other static values such as styles and classes.

This fix ensures that all static attribute values (attributes, classes,
and styles) that exist within a host definition for components and
directives are all assigned via the `elementHostAttrs` instruction.

```
// before
defineDirective({
  ...
  attributes: ['title', 'my title']
  ...
})

//now
defineDirective({
  ...
  hostBindings: function() {
    if (create) {
      elementHostAttrs(..., ['title', 'my-title']);
    }
    ...
  }
  ...
})
```

PR Close #28089
2019-01-15 09:45:41 -08:00
..
design docs(ivy): remove duplicated words in architecture doc (#27471) 2019-01-14 17:06:42 -08:00
src refactor(ivy): remove def.attributes in favor of the `elementHostAttrs` instruction (#28089) 2019-01-15 09:45:41 -08:00
test refactor(ivy): refactor more files in DI to prepare it for bazel packages (#28098) 2019-01-14 09:55:30 -08:00
testing build(bazel): use fine-grained npm deps (#26111) (#26488) 2018-10-19 20:59:29 -07:00
BUILD.bazel build: restrict visibility of npm_package targets (#27611) 2018-12-14 10:20:40 -08:00
compiler.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
index.ts build: roll up to named .js files rather than 'index.js' (#19190) 2017-09-19 16:59:18 -07:00
package.json fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734) 2018-10-31 14:15:06 -04:00
public_api.ts build: publish tree of files rather than FESMs (#18541) 2017-08-31 15:34:50 -07:00
rollup.config.js feat(core): upgrade rxjs to 6.0.0-alpha.4 (#22573) 2018-03-19 21:51:51 -07:00
tsconfig-build.json build(bazel): Turning on strictPropertyInitialization for Angular. (#24572) 2018-06-25 07:57:13 -07:00