Angular: ngx-translate. We improve the infrastructure using Webpack

Angular: ngx-translate. We improve the infrastructure using WebpackGood day.
 
It's time to ngx-translate lifhak. Initially, I planned 3 parts, but because the second part is in fact little informative - in this I will try to summarize the 2nd part as briefly as possible.
 
read 1
 
Consider AppTranslateLoader in the replacement of TranslateHttpLoader . Our AppTranslateLoader will primarily pay attention to the language of the browser and contain fallback logic, import the localization of MomentJs, and perform the download via APP_INITIALIZER. As a result of the merger of the two parts of the lifhaks, along the way, we will delve into the ...
+ 0 -

Angular cli 6: what is needed and how to use

Angular cli 6: what is needed and how to use
 
 
Hello!
 
 
The version of Angular ??? was released in September 2016. And immediately appeared a large number of approaches to building and building applications on this framework. On the Internet, you can find the Angular seed for every taste.
 
 
We also created our own Angular seed: we created a common project-template, ordered all the teams developing the front-end to use one application structure.
 
 
And in half a year, in March 201? the version of Angular cli (cli-command-line interface) ??? was released. The idea, taken as a basis, is simply excellent: to systematize the approach to developing ...
+ 0 -

As I migrated the project with Angular 1 on React

Hello!
 
I want to share my experience and tools that I used to migrate the project with Angular 1 on React .
 
TLTR:
I wrote module , with which you can transform the Angular components (controller + template) into React components.
ngReact , but there was no special desire to turn the project into such a monster of Frankenstein. Therefore, it was decided to move the project to React to simplify its development and support.
 
What was
 
The main project is
 
 
The project on Angular ???? angular-ui-router, angular-ui (modal windows, calendars)
 
60/40 - Typescript /ES2015 ...
+ 0 -

Maraquia - ORM for MongoDB

<{full}>
After reading the title, many probably have a question - why another bike if there are already run-in Mongoose, Mongorito, TypeORM, etc.? For the answer it is necessary to understand what is the difference between ORM and ODM. We look at Wikipedia:
 
ORM (English Object-Relational Mapping, Russian object-relational mapping, or transformation) is a programming technology that links databases to the concepts of object-oriented programming languages, creating a "virtual object database".
That is, ORM is just a pro-data representation of data. I recall that in relational databases there is no way ...
+ 0 -

A complete guide to the strategy of detecting changes Angular onPush

A complete guide to the strategy of detecting changes Angular onPush
 
Default strategy for detecting changes
 
By default, Angular uses
ChangeDetectionStrategy.Default
change detection strategy.
 
ChangeDetectionStrategy.Default
works in such a way that every time something changes in our application, as a result of various user events, timers, XHR, promises, etc., detection of changes will be launched across all components.
source code :
 
private _updateLatestValue (async: any, value: Object): void {
if (async === this._obj) {
this._latestValue = value;
this._ref.markForCheck ();
}
}

 

Angular calls markForCheck () ...

+ 0 -

How I started to love Vue

Introduction
 
How I started to love Vue
 
This post is a logical extension of my post /article - How I stopped loving Angular / How I stopped loving Angular .
 
It is recommended to read before reading.
 
For about a year now, in all the projects I'm involved in, I use Vue instead of Angular.
 
In this post, I will share the main impressions and differences after Angular, and also tell some things from the real experience of using Vue on combat projects.
conditioned = pain
 
 
Forms ...
+ 0 -

Angular: ngx-translate lifhaki

Good day.
 
In the near future I plan to publish a little ngx-translate lifhak.
 
 
In the first part zaoverradim TranslateCompiler to teach him how to compile pipes inside our json files. By the way, here is the link for an excellent pluralgender etc. compiler which works with ngx-translate.
 

Our task is to write our TranslateCompiler, which will be able to execute pipes inside ngx-translate localizations.
 
Let's start with the preparation of DI (because we will take the pipes from Injector), and initialize ngx-translate.


 

Add the right pipe in the providers of the ...

+ 0 -

Update Angular to the 6th version in the project without using CLI

In this article I will talk about the thorny way of updating Angular with the custom Webpack config, which our team had to go through a week ago. Perhaps our experience will be useful to those who use Angular with their Webpack config, and the rest is interesting as an illustration of where a modern frontend can go and how to live with it.
 
 
Update Angular to the 6th version in the project without using CLI  
 
Our team is working on the interface BILLmanager 6 . So that you had a general idea of ​​the project before the update, I will report that the number of files in it has already exceeded 67 thousand. Architecturally, there are two subprojects: the registration ...
+ 0 -

Authentication on Angular and Spring without Spring Security (client on Angular)

Part 1. Customer on Angular
 
What is this article
 
In this article, I'll discuss how to write simple authentication without the help of ready-made solutions for this task. It can be useful for beginners who want to write their AAA (Authentication, Authorization, and Accounting). Client repository on Angular and Server repository on Spring .
 
In this article, I'll do the excerpt of the client part code on Angular.
Part 2. Server on the Spring
 
Angular
 
ngrx
 
...
+ 0 -

Forms should be simple and declarative

Forms should be simple and declarative  
 
Many faced the choice of a library for working with forms in ReactJS. When I chose the one that suited me, different libraries seemed ideal BUT: form on configs or bulbs in onsubmit event, or asynchronous submit. Why form for the reaction do not correspond to the principles of the reaction. , why do they look like something special? If these questions came to your mind, or you like forms, I invite you to read the article.
 
contexts , which allows you to create additional components to work with the form and delegate responsibility. The form itself looks like a html projection, which simplifies ...
+ 0 -