Write Javascript in .hbs fils

(SMHassanAlavi) #1

Hi.I have writen a plugin and my plugin is working with an outlet.
in my connector (.hbs folder) I have accessed the username I want by typing {{username}}.

<script type="text/javascript">
	var temp = Handlebars.compile('{{username}}');
	var username = temp({});
	var likes;
	Handlebars.registerPartial('username', '{{username}}');
 	$.getJSON("http://localhost:3000/users/"+ username +"/summary.json", function (data) {
 		likes = data.summary.likes_received;

when I alert likes variable it works well but now I want to show it on outlet.how can I do it(I don’t know anything about emberJS)

(Pad Pors) #2

can you provide more information?

what do you want to do exactly? do you want to show the alert on the outlet or what?

(SMHassanAlavi) #3

How Can I show the likes in this outlet(this is a connector for plugin)