Skip to content

Instantly share code, notes, and snippets.

@vsavkin
Created January 14, 2019 14:37
Show Gist options
  • Save vsavkin/fc69982945d3a2aa6616836ade919b5a to your computer and use it in GitHub Desktop.
Save vsavkin/fc69982945d3a2aa6616836ade919b5a to your computer and use it in GitHub Desktop.
var TodosComponent = /** @class */ (function () {
function TodosComponent(store) {
this.store = store;
this.todos = this.store.pipe(select('todos'));
}
TodosComponent.ngComponentDef = defineComponent({
type: TodosComponent,
selectors: [["todos-cmp"]],
factory: function TodosComponent_Factory(t) {
return new (t || TodosComponent)(directiveInject(Store));
},
consts: 2,
vars: 3,
template: function TodosComponent_Template(rf, ctx) {
if (rf & 1) { // create dom
pipe(1, "async");
template(0, TodosComponent_div_Template_0, 2, 1, null, _c0);
} if (rf & 2) { // update dom
elementProperty(0, "ngForOf", bind(pipeBind1(1, 1, ctx.todos)));
}
},
encapsulation: 2
});
return TodosComponent;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment