Recently, I want to create a web extension for assisting to lookup information I need. In the web extension, I need to use the power of a npm package to complete some parts for me. But I have found v3 of manifest_version of chrome and v2 of manifest_version of firefox they don’t recommend to include outer packages with obfuscated version, this instruction lets me hesitating. I think there are many
read moreIf 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
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 more