I have the following function:
export function toCamelCase(string): string {
//code omitted
}
Then I use it on my feature components by adding reference as:
import * as utility from '../shared/functions/helper-functions';
However, I use a shared module and I am wondering if it is possible to add this helper function reference only to shared module and export it so that I can use its functions without adding its reference (I already add shared.module reference). Any idea?
import * as utility from '../shared/functions/helper-functions';
@NgModule({
declarations: [
//...
],
imports: [
//...
],
exports: [
// I want to add helper function as a module
],
providers: [
//...
})
export class SharedModule { }