Scopes en Javascript:
Si haces algo en plan:
var a = 10;
function foo() {
console.log(a);
}
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) { |
Scopes en Javascript:
Si haces algo en plan:
var a = 10;
function foo() {
console.log(a);
}