This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Customer { | |
let name:String | |
var netWorth:Double | |
init(name:String, netWorth:Double) { | |
self.netWorth = netWorth | |
self.name = name | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
var age:Int | |
let name:String | |
var eatsFood: Bool | |
var enjoysMusic: Bool | |
init(age:Int, name:String, eatsFood:Bool, enjoysMusic:Bool) { | |
self.age = age | |
self.name = name | |
self.eatsFood = eatsFood |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Directive({ | |
selector: '[barchart-data]' | |
}) | |
export class BarchartDataDirective { | |
private canvas: any; | |
@Input('barchart-data') data: number[]; | |
@Input('width') width: number; | |
@Input('height') height: number; | |
@Input('colors') colors: string[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Directive, ElementRef, HostListener, Input, Renderer } from '@angular/core'; | |
@Directive({ | |
selector: '[barchart-data]' | |
}) | |
export class BarchartDataDirective { | |
private canvas: any; | |
@Input('barchart-data') data: number[]; | |
@Input('width') width: number; | |
@Input('height') height: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Directive, ElementRef, HostListener, Input, Renderer } from '@angular/core'; | |
@Directive({ | |
selector: '[barchart-data]' | |
}) | |
export class BarchartDataDirective { | |
private canvas: any; | |
private ctx: any; | |
@Input('barchart-data') data: number[]; | |
@Input('width') width: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, Directive, ElementRef, HostListener, Input, Renderer } from '@angular/core'; | |
@Directive({ | |
selector: '[barchart-data]' | |
}) | |
export class BarchartDataDirective { | |
private canvas: any; | |
private ctx: any; | |
@Input('barchart-data') data: number[]; | |
@Input('width') width: number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Person { | |
var age:Int | |
let name:String | |
var eatsFood: Bool | |
var enjoysMusic: Bool | |
init(age:Int, name:String, eatsFood:Bool, enjoysMusic:Bool) { | |
self.age = age | |
self.name = name | |
self.eatsFood = eatsFood |