Does i18next work on cordova? - angularjs

I am making an app with Angular 1.5.3 and I know that the i18next library works with Angular. https://www.i18next.com/supported-frameworks.html
However, does this still apply if my angular app will be run inside of Cordova?

I recommend you to use angular-translate which can be found at this link: Angular Translate . I used it with a lot of Ionic projects. Thats works like a charm

Related

Can we use es6 with AngularJS

I'm working on an angularJS website and i wanna know if we can code in es6 natively (we use babel now) since the web browsers support es6.
Thanks,
Marius
EDIT: i use AngularJS 1.5.8

How to load modules in Angular Electron?

I have a functioning angular electron application which was made using this boilerplate code:
https://github.com/maximegris/angular-electron
I am trying to add the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) to my application and I'm stuck at "loading the module in your application by adding it as a dependent module":
angular.module('app', ['ngSanitize']);
How can I do this in an angular electron application with the current file setup? Thank you!
Like you can read on electron's website it uses Angular v2+ (currently 6.1.2). And you are trying write in AngularJS.
For the beginning here is something about modules: https://angular.io/guide/ngmodules but I would suggest you get familiar with whole tutorial and new version of Angular

Angular i18n will work on AngularJS 1.5?

Does i18n or ngx-translate work on Angular 1.5 (below Angular2)?
For angular 1.x version can use
https://www.npmjs.com/package/angular-translator
ngx-translate works with angular2 and above. However you can use
https://github.com/angular-translate/angular-translate
with angular 1.x versions

Use AngularJS (Angular1) module from Angular2 project

Just started a demo Angular2 project (no previous experience with Angular1/AngularJS. Have followed and extended from the online quickstart and tutorials, and all was fine. However I'm at the point where I would like to use some components from a library which is designed for AngularJS, and having no end of problems!
Most of the information available about AngularJS/Angular2 compatibility assumes that you have an AngularJS project that you're adding Angular2 components to - not the other way around - so what I'm hoping to do may not even be possible. What I've tried so far involves a simple stripped-back project based on the Angular2 quickstart, with a single Angular2 component that loads into the index.html. I'd then like to integrate components from the existing library (AngularJS-based) into this.
I've tried using UpgradeAdapter.upgradeNg1Component to create components from the library and add them directly into my Angular2 component
I've tried installing angularjs through npm, importing it in a script tag into my index.html and then using a combination of UpgradeAdapter.downgradeNg2Component and UpgradeAdapter.bootstrap to load my Angular2 as a downgraded module
Neither of these seem to work - the component fails to show, and the browser console tells me I've got an Uncaught SyntaxError: Unexpected token <
Evaluating http://localhost:3000/angular2/upgrade
Error loading http://localhost:3000/app/main.js
My best guess at the moment is that this is actually an unsupported scenario, and I need to have a 'proper' AngularJS app in order to use the UpgradeAdapter functionality from Angular2. Can anyone confirm this? Or is there something stupid I'm missing here?
Here is a working plunkr describing how to mix Angular1 and Angular2 elements:
http://plnkr.co/edit/yMjghOFhFWuY8G1fVIEg?p=preview
An important point is to bootstrap your main component on the UpgradeAdapter. This way all elements are available in providers (services / factories) and in directives (components / directives):
upgrade.bootstrap(document.body, ['heroApp']);
These two answers could help you:
angular 1.x and angular2 together
How to inject upgraded Angular 1 service/factory to Angular 2 component in ES5?
So the major problem in this case turned out to be the fact that it appears that the upgrade components aren't included as part of the basic angular 2 bundle. After adding:
<script src="node_modules/angular2/bundles/upgrade.min.js"></script>
to my index.html file the error I was seeing disappeared.
Thanks to the answer here for pointing me in the right direction!

Is there a recipe available for using jquery, datatables and angularjs with browserify?

I would like to use Datatables with AngularJS using the following directive:
http://l-lin.github.io/angular-datatables/
My JS build uses browserify. Would be great if someone could share the recipe/configuration for achieving the integration with Browserify.

Resources