e.g. how to add and choose a different java version :
1) download jdk1.7,
3) copy with scp jdk1.7 in /usr/local/dev/packages, unpack it in /opt/, install and pick the right version:
:~$ sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_79/bin/ 1
:~$ sudo update-alternatives --config java
3) set $JAVA_HOME
giovedì 16 giugno 2016
PARTIAL LOADER
The Partial Loader extends the Static Files Loader to a [part] parameter. This parameter can be set manually, when certain parts of the application are loaded, e.g., a module or a controller. Additionally to the [lang] parameter, this value can be included in the request url. During configuration, the Partial Loader takes a url template. This template will be directly passed to the server, when the language is set or changed
ANGULAR TRANSLATE ASYNCHRONOUS LOADING OF PARTIAL LANGUAGE FILES
1. directory structure
languages/
it/
static.json
dynamic.json
en/
static.json
dynamic.json
2. dependencies: <script src="../webjars/angular-translate-loader-partial/${angular-translate-loader-partial.version}/angular-translate-loader-partial.js"></script>
3. configuration: applying a template url path. (Now that we know how our data is structured, we can configure $translateProvider to use the partial loader with this pattern).
Everything to do is to add in app.js:
app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translateProvider', '$translatePartialLoaderProvider',
function ($stateProvider, $urlRouterProvider, $httpProvider, $translateProvider, $translatePartialLoaderProvider) {
$translatePartialLoaderProvider.addPart('static');
$translatePartialLoaderProvider.addPart('dynamic');
$translateProvider.useLoader('$translatePartialLoader', {
urlTemplate: 'languages/{lang}/{part}.json'
})
.preferredLanguage('en');
----------------
U can find a good demo here.
And other infos here:
https://angular-translate.github.io/docs/#/guide/12_asynchronous-loading
https://technpol.wordpress.com/2013/11/02/adding-translation-using-angular-translate-to-an-angularjs-app/
https://github.com/angular-translate/angular-translate/issues/399
ANGULAR TRANSLATE ASYNCHRONOUS LOADING OF PARTIAL LANGUAGE FILES
1. directory structure
languages/
it/
static.json
dynamic.json
en/
static.json
dynamic.json
2. dependencies: <script src="../webjars/angular-translate-loader-partial/${angular-translate-loader-partial.version}/angular-translate-loader-partial.js"></script>
3. configuration: applying a template url path. (Now that we know how our data is structured, we can configure $translateProvider to use the partial loader with this pattern).
Everything to do is to add in app.js:
app.config(['$stateProvider', '$urlRouterProvider', '$httpProvider', '$translateProvider', '$translatePartialLoaderProvider',
function ($stateProvider, $urlRouterProvider, $httpProvider, $translateProvider, $translatePartialLoaderProvider) {
$translatePartialLoaderProvider.addPart('static');
$translatePartialLoaderProvider.addPart('dynamic');
$translateProvider.useLoader('$translatePartialLoader', {
urlTemplate: 'languages/{lang}/{part}.json'
})
.preferredLanguage('en');
----------------
U can find a good demo here.
And other infos here:
https://angular-translate.github.io/docs/#/guide/12_asynchronous-loading
https://technpol.wordpress.com/2013/11/02/adding-translation-using-angular-translate-to-an-angularjs-app/
https://github.com/angular-translate/angular-translate/issues/399
Iscriviti a:
Post (Atom)
How to deploy Podman images to OpenShift Container Platform (CRC on localhost)
I have a microservice on localhost and I want to deploy its Podman image on OCP, which I am running using CRC on localhost. 1. Get the...
-
My intent is to configure SSO on Keycloak and Liferay. I have createad a docker-compose environment with Keycloak: #####################...
-
Precondizione: La precondizione di un metodo e' una condizione che deve essere verificata prima che quel metodo sia invocato. Le preco...