Add Angular 9 '@Injectable()' to tutorials and book store sample.

pull/3289/head
Oliver Cooper 5 years ago
parent db4b8d111b
commit 12053115db

@ -982,11 +982,13 @@ import { GetBooks } from '../actions/books.actions';
import { Books } from '../models/books';
import { BooksService } from '../../books/shared/books.service';
import { tap } from 'rxjs/operators';
import { Injectable } from '@angular/core';
@State<Books.State>({
name: 'BooksState',
defaults: { books: {} } as Books.State,
})
@Injectable()
export class BooksState {
@Selector()
static getBooks(state: Books.State) {

@ -574,11 +574,13 @@ import { GetBooks, CreateUpdateBook } from '../actions/books.actions'; //<== add
import { Books } from '../models/books';
import { BooksService } from '../../books/shared/books.service';
import { tap } from 'rxjs/operators';
import { Injectable } from '@angular/core';
@State<Books.State>({
name: 'BooksState',
defaults: { books: {} } as Books.State,
})
@Injectable()
export class BooksState {
@Selector()
static getBooks(state: Books.State) {
@ -1330,11 +1332,13 @@ import { GetBooks, CreateUpdateBook, DeleteBook } from '../actions/books.actions
import { Books } from '../models/books';
import { BooksService } from '../../books/shared/books.service';
import { tap } from 'rxjs/operators';
import { Injectable } from '@angular/core';
@State<Books.State>({
name: 'BooksState',
defaults: { books: {} } as Books.State,
})
@Injectable()
export class BooksState {
@Selector()
static getBooks(state: Books.State) {

@ -537,11 +537,13 @@ import { GetBooks } from '../actions/books.actions';
import { Books } from '../models/books';
import { BooksService } from '../../books/shared/books.service';
import { tap } from 'rxjs/operators';
import { Injectable } from '@angular/core';
@State<Books.State>({
name: 'BooksState',
defaults: { books: {} } as Books.State,
})
@Injectable()
export class BooksState {
@Selector()
static getBooks(state: Books.State) {

@ -7,11 +7,13 @@ import {
import { Books } from "../models/books";
import { BooksService } from "../../books/shared/books.service";
import { tap } from "rxjs/operators";
import { Injectable } from '@angular/core';
@State<Books.State>({
name: "BooksState",
defaults: { books: {} } as Books.State
})
@Injectable()
export class BooksState {
@Selector()
static getBooks(state: Books.State) {

Loading…
Cancel
Save