Skip to content

Instantly share code, notes, and snippets.

View rajaramtt's full-sized avatar
🤘
Learning and Sharing

Raja Ram T rajaramtt

🤘
Learning and Sharing
  • Hyderabad, India
View GitHub Profile
@rajaramtt
rajaramtt / map.ts
Last active September 14, 2020 19:54
/*
{
"goodPackage": {
"upsellList": [
{
"productCode": "product1"
}
]
@rajaramtt
rajaramtt / angular-query-string-and-parameters-example.ts
Last active August 21, 2020 11:00
Angular Query string and parameters example
import { Router, ActivatedRoute, Params } from '@angular/router';
constructor(
private router: Router,
private route: ActivatedRoute,
) { }
@rajaramtt
rajaramtt / CUSTOM_ELEMENTS_SCHEMA vs NO_ERRORS_SCHEMA in Angular8.md
Last active August 11, 2020 15:33
CUSTOM_ELEMENTS_SCHEMA vs NO_ERRORS_SCHEMA in Angular8

Including the CUSTOM_ELEMENTS_SCHEMA in the module allows the use of the web components in the HTML markup without the compiler producing errors

  • Defines a schema that allows an NgModule to contain the following:
    • Non-Angular elements named with dash case (-).
    • Element properties named with dash case (-).
  • Dash case is the naming convention for custom elements.
@rajaramtt
rajaramtt / Flex box and Grid layout.md
Last active June 4, 2020 04:39
Flex box and Grid layout

Diff

Grid Layout is a two-dimensional and flexbox is a one-dimensional

Grid’s approach is layout-first and Flexbox’ approach is content-first

Flexbox small-scale layouts Grid’s larger scale

Grid is Container-Based, Flexbox is Content-Based

@rajaramtt
rajaramtt / visualstudio Keyboard shortcuts for Windows.md
Last active May 25, 2020 11:40
visualstudio Keyboard shortcuts for Windows
Ctrl+, User Settings
Ctrl+K Ctrl+S Keyboard Shortcuts
Ctrl+T Show all Symbols
Ctrl+G Go to Line...
Ctrl+P Go to File...
Ctrl+Shift+O Go to Symbol...
Ctrl+Space Trigger suggestion
Ctrl+. Quick Fix
@rajaramtt
rajaramtt / Refactoring Tips.md
Created May 25, 2020 11:02
Refactoring Tips
const greet = (obj) => {
  return `${obj.greeting}, ${obj.firstName}${obj.lastName}`;
}
best way
const greet = ({
@rajaramtt
rajaramtt / angular forms.ts
Created May 17, 2020 11:44
angular forms
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
})
export class AppComponent {
form = this.formBuilder.group({
firstName: [''],
lastName: [''],
age: [''],
});
Property
<img [src]="heroImageUrl">
<app-hero-detail [hero]="currentHero"></app-hero-detail>
<div [ngClass]="{'special': isSpecial}"></div>
Event
<button (click)="onSave()">Save</button>
@rajaramtt
rajaramtt / Type Script .md
Last active January 5, 2020 18:55
Type Script

Annotations: TypeScript is statically typed and, therefore, all checks are performed at compile time. As mentioned before Types are annotated using :TypeAnnotation syntax.

Primitive Types

let isDone: boolean = false;