import { Component, OnInit, ElementRef } from '@angular/core'; import { CfCoreComponent } from '../core/core.component'; import { CfCoreBusinessComponent } from '../core-business/core-business.component'; import { CfButtonComponent } from '../button/button.component'; import { CfNewsComponent } from '../news/news.component'; import { CfWorldClockComponent } from '../world-clock/world-clock.component'; import { ClockComponentModel } from '../../models/clock/clock-component.model'; import { PageService } from '../../services/page-service/page.service'; /** * This component refers to a Weather app. */ @Component({ selector: 'cf-page', template: " Static Button Static Draggable Button ", styles: [""] }) export class CfPageComponent extends CfCoreBusinessComponent implements OnInit { clock : ClockComponentModel = { id: "Clock1", city: "Paris" }; constructor(public elementRef: ElementRef, public pageService: PageService) { super(elementRef); this.id = 'page_test';// have to set explicitly to get components form the storage } /** *

This method is called when initializing the component.

*/ ngOnInit() { super.ngOnInit(); this.pageService.loadComponents(this.id, []); } }