This will inject a store into your component and create the component itself—the typical way to call this one is by typing:
ng generate container jedis
This will create the following files:
- jedis.component.ts
- jedis.component.html
- jedis.component.css
- jedis.component.spec.ts
And in jedis.component.ts and the store will be injected in the constructor, like so:
// jedis.component.ts
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-jedis',
templateUrl: './jedis.component.html',
styleUrls: ['./jedis.component.css']
})
export class JedisComponent implements OnInit {
constructor(private store: Store<any>) { } }
ngOnInit() {}
}