angular.module('foo', []).directive('btnGroup'['$parse', function($parse) {
return {
restrict : 'E',
replace : true,
scope : true,
template : '',
link : function(scope, elem, attrs) {
This file contains 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} from '@angular/core'; | |
@Component({ | |
selector: 'app-my-chart', | |
template: ` <div> | |
<canvas baseChart [datasets]="chartData" [labels]="chartLabels" [options]="chartOptions" [legend]="chartLegend" | |
[chartType]="chartType"></canvas> | |
</div>` | |
}) | |
export class MyChartComponent { | |
public chartOptions: any = { |
This file contains 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
export interface PizzaContext { | |
toppings?: string[]; | |
size?: string; | |
} | |
export class DefaultPizzaContext implements PizzaContext { | |
toppings: string[]; | |
size: string; | |
constructor(form: PizzaContext = null) { |
NewerOlder