Skip to content

Instantly share code, notes, and snippets.

View Abhinay-g's full-sized avatar
🎯
Focusing

Abhinay Abhinay-g

🎯
Focusing
  • ABB
  • India
View GitHub Profile
touch .gitignore
git init
git add .
git commit -m "First commit"
git remote add origin remote repository URL
git push origin master
===========================================
create branch :
git branch branch-name
@import url('https://unpkg.com/[email protected]/dist/css/bootstrap.min.css'); // into Style.css
<form [formGroup]="myActivityForm" (ngSubmit)="onSubmit()">
<div class="form-group">
<label for="id">ID</label>
<input
type="text"
class="form-control"
id="id"
name="id"
So what are Zones ????
>Zones is a new mechanism that helps developers work with [[ multiple logically-connected ]] async operations.
>Zones associate each async operation with a zone.
>A zone is an execution context that persists across async tasks, and allows the creator of the zone
to observe and control execution of the code within the zone.
Okay , but what could be the advantage of this ??
> We can Associate some [[data]] with zone, which can be accessed by all [[async]] code registered with that Zone
> Also It can handle Uncaught Error Or Unhandled REJECTED promises.
@Abhinay-g
Abhinay-g / Add angular website to github pages
Created January 8, 2019 17:43
Add angular website to github pages
ng build --prod --output-path docs --base-href Git_HUB_PROJECT_NAME
git add .
git commit -m "commit message"
git push origin master
@Abhinay-g
Abhinay-g / Host Node JS on IIS
Created January 15, 2019 06:51
Host Node JS on IIS
install IISNODE and URLrewrite
run setupsamples.bat from iisnode folder inside programfiles/iisnode
open IIS then goto default website >> browse localhost:8080 you can see multiple links
open link , if erro then got to IIS root > goto Feature Delegation > change setting for Handler Mapping
All set
now goto inetpub > wwwroot > create folder for NodeJS code > goto security folder properties and add user IIS_IUSRS > give all permissions
goto IIS and add a website, set physical path to folder careted in above step.
create a web.config file and place it into forder created in wwwroot
webconfig content
=======================================================================
@Abhinay-g
Abhinay-g / IELTS words
Last active February 18, 2019 16:00
IELTS words
Debris:Construction Debris
Caddies: Someone who lift golf bag, kind of helper
Wager: synonym for bet
Sprawls: Land spred arround
Debilitate : makeing someone weak [many hard drungs are debilitating society ]
@Abhinay-g
Abhinay-g / C# code
Created February 28, 2019 15:11
C# code
using System;
using System.Collections.Generic;
class MyClass {
static void Main(string[] args) {
string[] ip = Console.ReadLine().Trim().Split(' ');
long a = Convert.ToInt64(ip[0]);
long b = Convert.ToInt64(ip[1]);
Console.Write(commDiv(a,b));
@Abhinay-g
Abhinay-g / Angular Artifacts
Last active April 2, 2019 10:39
For DataBinding
> property and event binding
In angular property and event binding is used to transfer data acreoss compoenent
This is the best approch for transferring data
if sender and reciever compomenet are very far then we can use observable seream using a data sharing service
@input() and @output() property decorators are used to pass data arround
> View Encapsulation
In angular a compoenent is associated with a SCSS file which is very specefic to that acompoenent .
but commmon CSS behaviour does not work like that It apply CSS to all element of that file.
>introduction Directive
Attribute and Structural directive
[No Dom change] [Dom Change]
Why cant we add multiple directive on same element like we can not use ngIf and ngFor on same element
> Gettting started with Directive
create a class with @Directive Devorator and [selector] as a paramter to decorator
using elementRef to change to style of an element
Note: Remember changing element style using [element.nativeElement.style.backgrroundColor] may not be available because Angular can render
@Abhinay-g
Abhinay-g / Angular Artifacts for Services and DI
Last active April 3, 2019 12:30
Angular Artifacts for Services and DI
>Services
Services are used to share common logic among set ot multiple component.
So a Service can containe a buisness logic or it can containe call to API
Services can be used for [logging], for [Data storage].
>Adding service
To added service we need to load the service into constructor and to Providers array in @Component({}) directive
>Hirachical Injector