Skip to content

Instantly share code, notes, and snippets.

Susana Hernandez susanahernandezd

Block or report user

Report or block susanahernandezd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View generate-cli
# Generate component: ng g c <COMPONENT_NAME>
# creates folder and .css, .html, .test and .ts files
ng g c about
View angular-app-create-scratch
# Install angular CLI to run ng commands
npm install -g @angular/cli
# Create new angular app
# --skip-install: to not install dependeces
ng new <APP_NAME> --skip-install
# Build and serve the aplicaction
ng serve
View serve-html
# https://www.npmjs.com/package/servor
# https://parceljs.org/getting_started.html
View init-project
# init project creating package.json
npm init
# init project and not make questions
npm init -y
View remove-array-duplicates
const array = ['one', 'one', 'two', 'three'];
//1. "Set"
[...Set(array)]
//2. "Filter"
array.filter((item, index) => array.indexOf(item) === index)
//3. "Reduce"
array.reduce((acc, item) => {
View filter-array-objects-another
const array = [
{ id: 1, name: 'a1' },
{ id: 2, name: 'a2'},
{ id: 3, name: 'a3'},
{ id: 4, name: 'a4'},
{ id: 5, name: 'a5'},
];
const anotherArray = [
{ id: 1, name: 'a1'},
View install-build-tools
npm install --global --production windows-build-tools@4.0.0
View list-global-npm-package
npm list -g --depth 0
// — depth 0 / — depth=0: avoid including every package’s dependencies in the tree view
You can’t perform that action at this time.