module app.preview {
    import TreeService = app.tree.TreeService;
    import DataschemaService = app.core.dataschema.DataschemaService;

    export class PreviewService implements Observer<PreviewUpdateEvent> {
        public schema:{};
        public uiSchema:{};

        static $inject = ['TreeService', 'DataschemaService'];

        constructor(private treeService:TreeService, private dataschemaService:DataschemaService) {
            this.schema = JSON.parse(treeService.exportUISchemaAsJSON());
            this.uiSchema = dataschemaService.getDataSchema();

            //this.treeService.registerObserver(this);
            //this.dataschemaService.registerObserver(this);
        }

        update(update:PreviewUpdateEvent) {
            if (update.containsSchema()) {
                this.schema = update.getSchema();
            } else if (update.containsUiSchema()) {
                this.uiSchema = update.getUiSchema();
            }
        }


    }

    angular.module('app.preview').service('PreviewService', PreviewService);
}
module app.preview {
    import TreeService = app.tree.TreeService;
    import DataschemaService = app.core.dataschema.DataschemaService;

    export class PreviewService implements Observer<PreviewUpdateEvent> {
        public schema:{};
        public uiSchema:{};

        static $inject = ['TreeService', 'DataschemaService'];

        constructor(private treeService:TreeService, private dataschemaService:DataschemaService) {
            this.schema = dataschemaService.getDataSchema();
            this.uiSchema = JSON.parse(treeService.exportUISchemaAsJSON());

            //this.treeService.registerObserver(this);
            //this.dataschemaService.registerObserver(this);
        }

        update(update:PreviewUpdateEvent) {
            if (update.containsSchema()) {
                this.schema = update.getSchema();
            } else if (update.containsUiSchema()) {
                this.uiSchema = update.getUiSchema();
            }
        }


    }

    angular.module('app.preview').service('PreviewService', PreviewService);
}
Correct error in schema and uiSchema assignments in constructor
Correct error in schema and uiSchema assignments in constructor
