2019 Dec 13 10:12 PM - edited 2024 Feb 03 5:23 PM
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'); } }
Request clarification before answering.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.