I found the way, i write here for others who may need it:
1] put this into the contructor this.templateSrv = $injector.get('templateSrv');
2] put something like this into the updateContent() [ keeping the
tutorial structure] . Consider I called my variable “lquery”. The
“try” is necessary.