Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Internationalization Angular2的NumericTextBox剑道用户界面,带有自定义IntlService_Internationalization_Kendo Ui Angular2 - Fatal编程技术网

Internationalization Angular2的NumericTextBox剑道用户界面,带有自定义IntlService

Internationalization Angular2的NumericTextBox剑道用户界面,带有自定义IntlService,internationalization,kendo-ui-angular2,Internationalization,Kendo Ui Angular2,我为Angular2拍摄了剑道UI的最新RC0。它的文档提到了国际化服务的使用。我已经创建了自定义IntlService,并在我的应用程序模块中配置了它的提供程序。在组件中,如果我使用IntlService依赖项,则会调用我的自定义服务,但NumericTextBox不会调用我的服务。以下代码中有什么错误 MyIntlService.ts import { CldrIntlService } from '@progress/kendo-angular-intl'; import { Inject

我为Angular2拍摄了剑道UI的最新RC0。它的文档提到了国际化服务的使用。我已经创建了自定义IntlService,并在我的应用程序模块中配置了它的提供程序。在组件中,如果我使用IntlService依赖项,则会调用我的自定义服务,但NumericTextBox不会调用我的服务。以下代码中有什么错误

MyIntlService.ts

import { CldrIntlService } from '@progress/kendo-angular-intl';
import { Injectable } from '@angular/core';

@Injectable()
export class MyIntlService extends CldrIntlService {         
        constructor() {
            super("en-US");
            console.info('From MyIntlService ctor');
        }
        formatNumber(value: number, format: string| NumberFormatOptions){
            const result = super.formatNumber(value,format);
            console.log('In MyIntlService formatNumber');
            return result;
        }  
}
app.module.ts

@NgModule({
  imports:      [ BrowserModule, InputsModule ],
  declarations: [ AppComponent ],
  bootstrap:    [ AppComponent ],
   providers:    [{
     provide: IntlService,
     useClass: MyIntlService
   }]
})
export class AppModule { }
应用程序组件

export class AppComponent  { 
  constructor(private intl: IntlService) {
      console.log( " From AppComponent " +  intl.formatNumber(42, "c"));
  }
}

您可以在中提交问题。请提供一个可运行的示例来演示该问题