improve documentation and test

This commit is contained in:
Eugenio Romano
2016-07-18 14:49:50 +01:00
parent 4f3467e7a5
commit 90a4ef0369
10 changed files with 171 additions and 19 deletions

View File

@@ -22,7 +22,8 @@ import { HTTP_PROVIDERS } from '@angular/http';
import {
ALFRESCO_CORE_PROVIDERS,
AlfrescoSettingsService,
AlfrescoAuthenticationService
AlfrescoAuthenticationService,
CONTEXT_MENU_DIRECTIVES
} from 'ng2-alfresco-core';
import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
@@ -50,10 +51,11 @@ import { WEBSCRIPTCOMPONENT } from 'ng2-alfresco-webscript';
[scriptArgs]="scriptArgs"
[contextRoot]="contextRoot"
[servicePath]="servicePath"
[contentType]="'HTM'"></alfresco-webscript-get>
</div>
[contentType]="'HTML'"
(onSuccess)= "logData($event)"></alfresco-webscript-get>
</div>{{prova}}
`,
directives: [WEBSCRIPTCOMPONENT]
directives: [WEBSCRIPTCOMPONENT, CONTEXT_MENU_DIRECTIVES]
})
class WebscriptDemo implements OnInit {
@@ -73,6 +75,8 @@ class WebscriptDemo implements OnInit {
token: string;
prova: string;
constructor(private authService: AlfrescoAuthenticationService,
private alfrescoSettingsService: AlfrescoSettingsService) {
@@ -107,6 +111,10 @@ class WebscriptDemo implements OnInit {
this.authenticated = false;
});
}
logData(data) {
console.log(data);
}
}
bootstrap(WebscriptDemo, [