@@ -2,18 +2,18 @@ import { Injectable } from '@angular/core';
22import { Actions, <%= effectMethod %><% if (feature) { %>, ofType<% } %> } from '@ngrx/effects';
33<% if (feature && api) { %>import { catchError, map, concatMap } from 'rxjs/operators';
44import { EMPTY, of } from 'rxjs';
5- <% if (!effectCreators ) {%>import { Load<%= classify(name) %>sFailure, Load<%= classify(name) %>sSuccess, <%= classify(name) %>ActionTypes, <%= classify(name) %>Actions } from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
6- <% if (effectCreators ) {%>import * as <%= classify(name) %>Actions from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
5+ <% if (!creators ) {%>import { Load<%= classify(name) %>sFailure, Load<%= classify(name) %>sSuccess, <%= classify(name) %>ActionTypes, <%= classify(name) %>Actions } from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
6+ <% if (creators ) {%>import * as <%= classify(name) %>Actions from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
77<% } %>
88<% if (feature && !api) { %>import { concatMap } from 'rxjs/operators';
99import { EMPTY } from 'rxjs';
10- <% if (!effectCreators ) {%>import { <%= classify(name) %>ActionTypes, <%= classify(name) %>Actions } from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
11- <% if (effectCreators ) {%>import * as <%= classify(name) %>Actions from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
10+ <% if (!creators ) {%>import { <%= classify(name) %>ActionTypes, <%= classify(name) %>Actions } from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
11+ <% if (creators ) {%>import * as <%= classify(name) %>Actions from '<%= featurePath(group, flat, "actions", dasherize(name)) %><%= dasherize(name) %>.actions';<% } %>
1212<% } %>
1313
1414@Injectable()
1515export class <%= classify(name) %>Effects {
16- <% if (feature && api && !effectCreators ) { %>
16+ <% if (feature && api && !creators ) { %>
1717 <%= effectStart %>
1818 ofType(<%= classify(name) %>ActionTypes.Load<%= classify(name) %>s),
1919 concatMap(() =>
@@ -23,7 +23,7 @@ export class <%= classify(name) %>Effects {
2323 catchError(error => of(new Load<%= classify(name) %>sFailure({ error }))))
2424 )
2525 <%= effectEnd %>
26- <% } else if (feature && api && effectCreators ) { %>
26+ <% } else if (feature && api && creators ) { %>
2727 <%= effectStart %>
2828 ofType(<%= classify(name) %>Actions.load<%= classify(name) %>s),
2929 concatMap(() =>
@@ -34,22 +34,22 @@ export class <%= classify(name) %>Effects {
3434 )
3535 <%= effectEnd %>
3636<% } %>
37- <% if (feature && !api && !effectCreators ) { %>
37+ <% if (feature && !api && !creators ) { %>
3838 <%= effectStart %>
3939 ofType(<%= classify(name) %>ActionTypes.Load<%= classify(name) %>s),
4040 /** An EMPTY observable only emits completion. Replace with your own observable API request */
4141 concatMap(() => EMPTY)
4242 <%= effectEnd %>
43- <% } else if (feature && !api && effectCreators ) { %>
43+ <% } else if (feature && !api && creators ) { %>
4444 <%= effectStart %>
4545 ofType(<%= classify(name) %>Actions.load<%= classify(name) %>s),
4646 /** An EMPTY observable only emits completion. Replace with your own observable API request */
4747 concatMap(() => EMPTY)
4848 <%= effectEnd %>
4949<% } %>
50- <% if (feature && !effectCreators ) { %>
50+ <% if (feature && !creators ) { %>
5151 constructor(private actions$: Actions<<%= classify(name) %>Actions>) {}
52- <% } else if (feature && effectCreators ) { %>
52+ <% } else if (feature && creators ) { %>
5353 constructor(private actions$: Actions) {}
5454<% } else { %>
5555 constructor(private actions$: Actions) {}
0 commit comments