typescript - Globalize js inside angular component -
hi im trying create angular 4 application supports l10n .i want use globalize in application .my component app component below
import { component,oninit } '@angular/core'; import globalize 'globalize'; @component({ selector: 'app-root', templateurl: './app.component.html', styleurls: ['./app.component.css'] }) export class appcomponent implements oninit { glb:any; constructor() { var formatter = globalize.numberformatter(); console.log(formatter(233)); } ngoninit() { this.glb=globalize; console.log(this.glb.currencyformatter("1234")); } }
but during compilation ,im getting below error
error in ./src/app/app.component.ts module not found: error: can't resolve 'globalize' in 'c:\project\aag @ ./src/app/app.component.ts 12:0-34 @ ./src/app/app.module.ts @ ./src/main.ts @ multi webpack-dev-server/client?http://localhost:4201 ./src/main.ts
any appreciated
Comments
Post a Comment