cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to extend YtreeComponent in SmartEdit

phoude
Participant
0 Likes
263

Hi, I am trying to extend the YtreeComponent in SmartEdit by adding new functions. Although the below code resolves correctly in typescript it will fail the "grunt dev" task because it cannot locate the module for yTreeComponent. How can I extend this component?

import * as angular from "angular";

import {SeComponent} from 'smarteditcommons';

import {YtreeComponent} from 'smartedit-build/lib/smarteditcommons/src/components/tree/YtreeComponent';

import {ITreeService, TreeDragOptions} from 'smartedit-build/lib/smarteditcommons/src/components/tree/types';
@SeComponent({ templateUrl: 'yTreeComponentTemplate.html', inputs: [ 'nodeTemplateUrl:=', 'nodeUri:=', 'nodeActions:=', 'rootNodeUid:=', 'dragOptions:=', 'removeDefaultTemplate:=?', 'showAsList:=?' ] }) export class CustomYtreeComponent extends YtreeComponent {

constructor( $scope: angular.IScope, $q: angular.IQService, TreeService: {new(uri: string): ITreeService}, _TreeDndOptions: {new(options: TreeDragOptions): any} )

{ super($scope, $q, TreeService, _TreeDndOptions); }


aNewFunction() { console.log('my new functipon goes here'); } }

Accepted Solutions (0)

Answers (0)