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 / ElementRef, TemplateRef, ViewRef, ComponentRef and ViewContainerRef.ts
Last active October 22, 2023 17:26
ElementRef, TemplateRef, ViewRef, ComponentRef and ViewContainerRef
//--------------- ElementRef----------------------
@ViewChild('foo', {static: false}) foo: ElementRef;
@Component({
selector: 'sample',
template: `
@rajaramtt
rajaramtt / trim-input.directive.ts
Created September 1, 2020 12:52
Angular Input Trim Directive
import { Directive, HostListener, OnInit, Optional } from '@angular/core';
import { NgControl } from '@angular/forms';
@Directive({
// tslint:disable-next-line:directive-selector
selector: 'input[trimInput],textarea[trimInput]',
})
export class TrimInputDirective implements OnInit {
constructor(@Optional() private ngControl: NgControl) {
@rajaramtt
rajaramtt / gist
Last active October 19, 2021 20:57
12
# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH
# Add all the files:
git add -A
# Commit the changes:
git commit -am "Initial commit"
@rajaramtt
rajaramtt / PromiseCode.ts
Last active July 22, 2021 15:30
Promise Code in JS
testFun(): void {
this.testPromise(identity).then(data => {
}).catch(function (e) {
console.log(e);
});
@rajaramtt
rajaramtt / Sass.md
Last active May 29, 2021 09:10
Sass (which stands for Syntactically Awesome Style Sheets) is an extension to CSS

Sass (which stands for Syntactically Awesome Style Sheets) is an extension to CSS.

sass is superset of css Sass is syntatic sugar of css It helps in writing CSS quickly.

SASS supports two syntaxes namely SCSS and Indented syntax

  • The SCSS - is an extension of CSS syntax. files use the extension .scss.
@rajaramtt
rajaramtt / nx-structure-angular-nestjs.md
Created April 9, 2021 18:24 — forked from trungvose/nx-structure-angular-nestjs.md
Nx workspace structure for NestJS and Angular

Nx

https://nx.dev/

Nx is a suite of powerful, extensible dev tools to help you architect, test, and build at any scale — integrating seamlessly with modern technologies and libraries while providing a robust CLI, caching, dependency management, and more.

It has first-class support for many frontend and backend technologies, so its documentation comes in multiple flavours.

Principles

@rajaramtt
rajaramtt / gist:51d4851102dc0a816b760a889643d093
Created February 5, 2021 08:04
SEO in Angular Without Server-Side Rendering
https://medium.com/codestory/seo-in-angular-without-server-side-rendering-fa7d984dd44b
https://meganrook.medium.com/angular-error-handling-made-easy-9bca1b4c52b0
@rajaramtt
rajaramtt / cookie-typescript-utils.ts
Created November 23, 2020 12:31 — forked from joduplessis/cookie-typescript-utils.ts
Setting, deleting and retrieving cookies in Typescript.
@rajaramtt
rajaramtt / React.md
Last active October 11, 2020 18:35
React is an open-source JavaScript library

React is a JavaScript library

React is not a framework (unlike Angular, which is more opinionated)

React is an open-source project created by Facebook

creating a new single-page app, use Create React App. server-rendered website with Node.js, try Next.js.