git reviewAdded Command for tutorial
Change-Id: Ib1111ae8e4108c542296ee2c2c145271d905da72
diff --git a/views/ngXosViews/UITutorial/src/js/main.js b/views/ngXosViews/UITutorial/src/js/main.js
index c89f1da..627a560 100644
--- a/views/ngXosViews/UITutorial/src/js/main.js
+++ b/views/ngXosViews/UITutorial/src/js/main.js
@@ -23,7 +23,7 @@
bindToController: true,
controllerAs: 'vm',
templateUrl: 'templates/js-shell.tpl.html',
- controller: function(ExploreCmd){
+ controller: function(ExploreCmd,LearnCmd){
var history = new Josh.History({ key: 'jsshell.history'});
this.shell = Josh.Shell({history: history});
@@ -45,6 +45,20 @@
}
});
+ this.shell.setCommandHandler('learn', {
+ exec: (cmd, args, done) => {
+ LearnCmd.setup(this.shell);
+ done(TemplateHandler.instructions({
+ title: `You can now learn the API`,
+ messages: [
+ `Use <code>next</code> to move to the next lesson <code>resource {resoureName} {method} {?paramters}</code> to call the API.`,
+ `An example command is <code>resource Slices query</code>`,
+ `You can also provide paramters with <code>next</code>`
+ ]
+ }));
+ }
+ });
+
this.shell.activate();
}
};