Skip to content
Snippets Groups Projects
Commit 545ae4be authored by Xiao Gui's avatar Xiao Gui
Browse files

bugfix: aot-build named function

parent d6940a0a
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,16 @@ export const getStateStore = ({ state: state = defaultState } = {}) => (prevStat ...@@ -42,7 +42,16 @@ export const getStateStore = ({ state: state = defaultState } = {}) => (prevStat
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore() {
return getStateStore()
}
export interface ActionInterface extends Action{ export interface ActionInterface extends Action{
favDataEntries: DataEntry[] favDataEntries: DataEntry[]
......
...@@ -141,7 +141,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State ...@@ -141,7 +141,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore(){
return getStateStore()
}
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
......
...@@ -47,4 +47,13 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State ...@@ -47,4 +47,13 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore() {
return getStateStore()
}
...@@ -107,7 +107,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State ...@@ -107,7 +107,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore() {
return getStateStore()
}
export interface StateInterface{ export interface StateInterface{
mouseOverSegments: { mouseOverSegments: {
......
...@@ -71,8 +71,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState: Stat ...@@ -71,8 +71,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState: Stat
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore() {
return getStateStore()
}
@Injectable({ @Injectable({
providedIn: 'root' providedIn: 'root'
......
...@@ -90,4 +90,13 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State ...@@ -90,4 +90,13 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:State
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore(){
return getStateStore()
}
...@@ -181,7 +181,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:Parti ...@@ -181,7 +181,16 @@ export const getStateStore = ({ state = defaultState } = {}) => (prevState:Parti
} }
} }
export const stateStore = getStateStore() // must export a named function for aot compilation
// see https://github.com/angular/angular/issues/15587
// https://github.com/amcdnl/ngrx-actions/issues/23
// or just google for:
//
// angular function expressions are not supported in decorators
export function stateStore() {
return getStateStore()
}
export const LOAD_DEDICATED_LAYER = 'LOAD_DEDICATED_LAYER' export const LOAD_DEDICATED_LAYER = 'LOAD_DEDICATED_LAYER'
export const UNLOAD_DEDICATED_LAYER = 'UNLOAD_DEDICATED_LAYER' export const UNLOAD_DEDICATED_LAYER = 'UNLOAD_DEDICATED_LAYER'
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment