-
Notifications
You must be signed in to change notification settings - Fork 1
done - need to do jq json #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| <script type="application/javascript"> | ||
| window.onload = function() { | ||
| require(['config'], function() { | ||
| require(['jquery'], function($) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should be able to join multiple require statements using more than one dep:
require(['config', 'jquery'], function(config, $) {
| require(['config'], function() { | ||
| require(['jquery'], function($) { | ||
| $(document).ready(function() { | ||
| require(['jquery','tmpl','ajaxGet'], function($, tmpl, ajaxGet) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already have jquery. Why not move all these deps into the require statement above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need your help about it
it did not work for me
| $('#button1').click(function() { | ||
| ajaxGet('json/data.json', function(phoneBookData) { | ||
| $('li').remove(); | ||
| $("#phoneBookTemplate").tmpl( phoneBookData ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't phoneBookData contain a list of items? Isn't the template for 1 item? Should you not need to loop over it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i did {{each name}}.......{{/each}} do not work
and i did remove it and it loops :)
No description provided.