Since Angular2 RC6 version you can set default locale directly in your app module (providers):
import {NgModule, LOCALE_ID} from '@angular/core';
@NgModule({
providers: [{
provide: LOCALE_ID,
useValue: 'de-DE' // 'de-DE' for Germany, 'fr-FR' for France ...
},
]
})
Afterwards the currency pipe should pick up the locale settings and move the symbol to right:
@Component({
selector:"my-app",
template:`
<h2>Price:<h2>
{{price|currency:'EUR':true}}
`
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…