robisim74 / angular-l10n-sample Goto Github PK
View Code? Open in Web Editor NEWAngular l10n sample
Home Page: https://github.com/robisim74/angular-l10n
License: MIT License
Angular l10n sample
Home Page: https://github.com/robisim74/angular-l10n
License: MIT License
in app.module.ts
lets say you set this.locale.AddConfiguration().DefineDefaultLocale('it', 'IT')
instead of this.locale.AddConfiguration()DefineDefaultLocale('en', 'US')
the language does not change.
console.log(this.locale.defaultLocale.languageCode) // --> "en"
Am i doing something wrong here?
Hello Roberto,
Your sample have an issue where a lot of words do not translate but display "No key" at the first time loading. Do you know what is the issue? I have the same problem in my website.
I am trying to use directive to localise my date and numbers. I notice that if I did not initialise the variable the directive will stop working. This is a problem to me because my date is retrieve from the database using observerables and will not be initialise at first when the page loads
This is a sample I used to reproduce the issue.
HTML
{{testDate}}
{{testNumber}}
{{testDate2}} // not working
{{testNumber2}} // not working
TS
private testDate: Date = new Date();
private testNumber: number = 1000;
private testDate2: Date; // Not initialise
private testNumber2: number; // Not initialise
ngOnInit() {
setInterval(() => {
this.testIncrement = this.testIncrement + 1;
this.testDate = new Date();
this.testDate2 = new Date();
this.testNumber = 1000 + this.testIncrement;
this.testNumber2 = 1000 + this.testIncrement;
}, 1000);
}
Hello, sorry about that, it really stupid question, but I need your advice
I can not figure out what I should do with node.js, how to configure it...
What I did:
I had this URL - http://localhost:8080/#/home
@NgModule({
imports: [
RouterModule.forRoot(routes, {
useHash: false, /////////////////////////// I disabled hash stategy
preloadingStrategy: PreloadAllModules
})
],
exports: [RouterModule]
})
Right now, I have this URL http://localhost:8080/home
But after I pressed the F5 button I'm getting exceptions
Cannot GET /home
I guess, the fix should be very easy, but I can find nothing about routing in the project
To replicate:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.