{"action":"created","issue":{"url":"https://api.github.com/repos/petersirka/Tangular/issues/2","labels_url":"https://api.github.com/repos/petersirka/Tangular/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/petersirka/Tangular/issues/2/comments","events_url":"https://api.github.com/repos/petersirka/Tangular/issues/2/events","html_url":"https://github.com/petersirka/Tangular/issues/2","id":59389331,"number":2,"title":"Adding entry and refresh template","user":{"login":"hyousef","id":840673,"avatar_url":"https://avatars.githubusercontent.com/u/840673?v=3","gravatar_id":"","url":"https://api.github.com/users/hyousef","html_url":"https://github.com/hyousef","followers_url":"https://api.github.com/users/hyousef/followers","following_url":"https://api.github.com/users/hyousef/following{/other_user}","gists_url":"https://api.github.com/users/hyousef/gists{/gist_id}","starred_url":"https://api.github.com/users/hyousef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hyousef/subscriptions","organizations_url":"https://api.github.com/users/hyousef/orgs","repos_url":"https://api.github.com/users/hyousef/repos","events_url":"https://api.github.com/users/hyousef/events{/privacy}","received_events_url":"https://api.github.com/users/hyousef/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-01T09:19:06Z","updated_at":"2015-03-01T09:29:42Z","closed_at":null,"body":"Hi Peter,\r\n\r\nThe below code run corrctly with me, I'm doing it in the cirrect way, is there a simplet way. thanks\r\n```html\r\n<!DOCTYPE html>\r\n<meta name=\"robots\" content=\"noindex\">\r\n<html>\r\n<head>\r\n  <meta charset=\"utf-8\">\r\n  <title>Multi lines entry</title>\r\n<script src=\"tangular.js\"></script>\r\n</head>\r\n<body>\r\n\r\n<div id='output'></div>\r\n\r\n<input type=\"text\" id=\"newOrderNum\"/>\r\n<input type=\"text\" id=\"newOrderName\"/>\r\n<button id=\"AddOrderBtn\">Add user</button>\r\n\r\n<script id=\"template\" type=\"text/html\">\r\n{{foreach m in orders}}\r\n    <h2>Order num.{{m.number}} (current index: {{$index}})</h2>\r\n    <div>{{m.name}}</div>\r\n{{end}}\r\n</script>\r\n\r\n<script>\r\nTangular.register('plus', function() {});\r\n\r\nvar model = { name: 'total.js', age: 2, orders: [{ number: 1001, name: 'iPhone' }, { number: 1002, name: 'Samsung' }]};\r\nvar source = Tangular.compile(document.getElementById('template').innerHTML);\r\n\r\ndocument.querySelector('#output').innerHTML = source(model);\r\n\r\ndocument.querySelector('#AddOrderBtn').addEventListener(\"click\", function(){\r\n\r\n\tvar newON = document.querySelector('#newOrderNum').value;\r\n\tvar newNM = document.querySelector('#newOrderName').value;\r\n\r\n\tmodel.orders.push({\"number\": newON, \"name\": newNM});\r\n\r\n\tdocument.querySelector('#newOrderNum').value=\"\";\r\n\tdocument.querySelector('#newOrderName').value=\"\";\r\n\r\n\tdocument.querySelector('#output').innerHTML = source(model);\r\n});\r\n\r\n</script>\r\n</body>\r\n</html>\r\n```"},"comment":{"url":"https://api.github.com/repos/petersirka/Tangular/issues/comments/76589481","html_url":"https://github.com/petersirka/Tangular/issues/2#issuecomment-76589481","issue_url":"https://api.github.com/repos/petersirka/Tangular/issues/2","id":76589481,"user":{"login":"petersirka","id":2414252,"avatar_url":"https://avatars.githubusercontent.com/u/2414252?v=3","gravatar_id":"","url":"https://api.github.com/users/petersirka","html_url":"https://github.com/petersirka","followers_url":"https://api.github.com/users/petersirka/followers","following_url":"https://api.github.com/users/petersirka/following{/other_user}","gists_url":"https://api.github.com/users/petersirka/gists{/gist_id}","starred_url":"https://api.github.com/users/petersirka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petersirka/subscriptions","organizations_url":"https://api.github.com/users/petersirka/orgs","repos_url":"https://api.github.com/users/petersirka/repos","events_url":"https://api.github.com/users/petersirka/events{/privacy}","received_events_url":"https://api.github.com/users/petersirka/received_events","type":"User","site_admin":false},"created_at":"2015-03-01T09:29:42Z","updated_at":"2015-03-01T09:29:42Z","body":"I use `jQuery` and `jComponent` (a component library for jQuery, but I don't have any example yet.\r\n\r\nI see one problem:\r\n```javascript\r\nTangular.register('plus', function() {\r\n    return 'MUST RETURN A NEW VALUE';\r\n});\r\n```"}}