This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://npm.taobao.org/mirrors/node-sass/v4.14.0/ | |
All node sass versions are available in the above link. | |
To fix build error showing node-sass issue | |
copy that particular node-sass file from above link and paste it into /Users/<your-name>/AppData/Roaming/npm-cache/node-sass/<4.13.1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class ApiResponseModel<T> { | |
statusCode = ''; | |
userFriendlyMessage = ''; | |
object: T | undefined; | |
} | |
protected get<T>(endpoint: string, params: any): Observable<ApiResponseModel<T>> { | |
return this.backendService.get(endpoint, { | |
...params | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To understand the basics of theming, please see: | |
https://material.angular.io/guide/theming | |
There are some pre-built color palettes like $mat-indigo, $mat-pink that can be used in our custom theme. Please see this link for the list of available color palettes, we just need to prefix "$mat-" to use the available palette. | |
However, it is best to create our own custom color palettes for primary and secondary colors and the following is a useful tool for that | |
http://mcg.mbitson.com/#!?mcgpalette0=%233f51b5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BAZEL | |
Bazel is Google’s open-source part of its internal build tool called Blaze. | |
The biggest selling point for this tool is that it is capable of doing incremental builds and tests! | |
Incremental build means that it will only build what has changed since the last build. | |
The same tool can be used to build frontends and backends. | |
https://angular.io/guide/bazel | |
IVY | |
Angular Ivy is a next-generation compilation and rendering pipeline, which reduces the bundle size, loads faster in slower networks and is simple to use. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git update-index --assume-unchanged <file-name> | |
to undo it | |
git update-index --no-assume-unchanged <file> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup Nexus (by DevOps) | |
1. Login in Nexus and create a npm (hosted) repository (to upload our package) | |
2. Create npm proxy repository for http://registry.npmjs.org (to download public packages from npmjs) | |
3. Create npm group repository to group "hosted" and "proxy" repository. | |
This group repository is used in our .npmrc file to download all packages. | |
Build library | |
1. Create build for the angular libary (in dist folder) | |
ng build | |
2. Create tgz file (to be uploaded on Nexus) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. format document | |
Alt + Shift + f | |
2. format selection | |
Ctrl + k, Ctrl + f | |
3. comment/uncomment | |
Ctrl + / | |
4. Angular switcher extension |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// first create a Controllers folder | |
// basic example of a controller and its actions | |
using Microsoft.AspNetCore.Mvc; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The ASP.NET Core architecture features a system of middleware, which are pieces of code that handle requests and responses. Middleware are chained to each other to form a pipeline | |
// Incoming requests are passed through the pipeline, where each middleware has a chance to do something with them before passing them to the next middleware. Outgoing responses are also passed through the pipeline, in reverse order. | |
// (ex: MVC is a middleware, Auth is a middleware, serve static files is also a middleware) | |
// ConfigureServices method of Startup class | |
// add MVC middleware | |
services.AddMVC() | |
// to add a default route along with MVC middleware | |
app.UseMvc(routes => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .NET core is built from scratch | |
// Main method is the entry point to the application | |
// Startup class is the enhanced way to configure your pipeline as well as dependency injection | |
// The project file is now "csproj" file (project.json/xproj is replaced with csproj file in .NET core 2, project.json was not compatible with MS build (DevOps platform)) | |
// wwwroot folder for static files | |
// ConfigureServices method in Startup class configures any dependency injection (like providers in Angular) | |
// NuGet is used for managing packages. | |
// NPM can also be used for client side packages .. |
NewerOlder