Angular 2 Building Blocks Hacker rank Hands-On Solutions Directive
import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', }) export class AppComponent { constructor(){ this.selectedDay=0 } show:boolean; message:string; selectedDay:number selectedValue:string days=[ { 'today':'Monday','msg':'Marvelous Mondays!'}, { 'today':'Tuesday','msg':'Thrilling Tuesdays!'}, { 'today':'Wednesday','msg':'Wonderful Wednesdays!'}, { 'today':'Thursday','msg':'Trendy Thursdays!'}, { 'today':'Friday','msg':'Fantastic Fridays!'}, { 'today':'Saturday','msg':'Super Saturdays!'}, { 'today':'Sunday','msg':'Sunny Sundays!'} ] //Define your variables show,message,selectedDay,selectedValue,days //Define your constructor here ...