Skip to content

Instantly share code, notes, and snippets.

View diegodelfin7's full-sized avatar

Bryan Delfin diegodelfin7

  • Lima, Perú
View GitHub Profile
@rjmccluskey
rjmccluskey / example-component.ts
Last active October 17, 2021 04:47
Angular 2 Input with TypeScript property (getter and setter)
import { Component, Input } from '@angular/core';
@Component({
selector: 'example',
template: `{{data}}` // getting `data` in the template will call the getter method!
})
export class ExampleCoponent {
private dataInternal: number;
@Input() set data(data: number) {
@Foxandxss
Foxandxss / modulepattern.md
Last active November 6, 2020 17:44
Module pattern Javascript (Español)

Scopes en Javascript:

Si haces algo en plan:

var a = 10;

function foo() {
  console.log(a);
}