If you want to upload file content to remote server using Angular, there are roughly two kinds of methods can achieve requirements. First is about raw file content. You can upload raw content with other values of form fields together, and their values will be separated automatically by browsers using Content-Type: multipart/form. myForm: FormGroup = null; fileName: string = ''; /** * constructor of a component */ constructor( private _formBuilder:
read moreSometimes, you have done wrong reorganization commits by command git rebase -i COMMIT_ID. It can be recovered from wrong actions by using command: git reset HEAD@{NUMBER}. Warning1: This can be recovered limited actions done by git tool. Figure 1: git reflog show Using by command: git reflog show, it will show recent history you do with git commands. You can find out information from this limited list and choose one
read moreReformat Date. Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}. Month is in the set {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}. Year is in the range [1900, 2100]. Convert the date string to the format YYYY-MM-DD, where: YYYY denotes the 4 digit year. MM denotes the 2 digit month.
read moreNebular is a UI libary from Akveo company for Angular. It can be customized for meeting your needs and has many components and visual themes. It also has authenticate and security modules. NgxAdmin is an admin dashboard built based on Nebular. NgxAdmin is also customizable. Key tip: I use isGranted() of NbAccessChecker from Nebular’s security package, canLoad and canActivate directive from Angular framework to achieve features inside this article. I
read moreModern web systems often require users to login first and then allow those, who are login successfully, start to use. If these systems are built with concept of single page application, it’s good to try Cypress for automatic UI end-to-end testing. The login is first one need to be solved for Cypress testing. Notice: The content of this article has been tested at cypress version 5.6.0, 6.2.0, angular version 6.1.10,
read moreMerge two sorted linked lists and return it as a sorted list. The list should be made by splicing together the nodes of the first two lists. Example 1: Input: l1 = [1,2,4], l2 = [1,3,4] Output: [1,1,2,3,4,4] Example 2: Input: l1 = [], l2 = [] Output: [] Example 3: Input: l1 = [], l2 = [0] Output: [0] Constraints: The number of nodes in both lists is in the range [0, 50].
read more