{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/2197","repository_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack","labels_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/2197/labels{/name}","comments_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/2197/comments","events_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/2197/events","html_url":"https://github.com/angular-fullstack/generator-angular-fullstack/issues/2197","id":174569473,"number":2197,"title":"Can we use ES6 generators?","user":{"login":"aabm00","id":2041161,"avatar_url":"https://avatars.githubusercontent.com/u/2041161?v=3","gravatar_id":"","url":"https://api.github.com/users/aabm00","html_url":"https://github.com/aabm00","followers_url":"https://api.github.com/users/aabm00/followers","following_url":"https://api.github.com/users/aabm00/following{/other_user}","gists_url":"https://api.github.com/users/aabm00/gists{/gist_id}","starred_url":"https://api.github.com/users/aabm00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aabm00/subscriptions","organizations_url":"https://api.github.com/users/aabm00/orgs","repos_url":"https://api.github.com/users/aabm00/repos","events_url":"https://api.github.com/users/aabm00/events{/privacy}","received_events_url":"https://api.github.com/users/aabm00/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-01T16:33:16Z","updated_at":"2016-09-01T17:25:33Z","closed_at":"2016-09-01T17:25:33Z","body":" - [ ] I understand that GitHub issues are not for tech support, but for questions specific to this generator, bug reports, and feature requests.\r\n\r\nItem | Version\r\n----- | -----\r\ngenerator-angular-fullstack | 3.7.6\r\nNode | 4.4.5\r\nnpm | 3.8.9\r\nOperating System | Windows 7\r\netc | etc\r\n\r\nItem | Answer\r\n----- | -----\r\nTranspiler | TypeScript\r\nMarkup | HTML\r\nCSS | CSS\r\nRouter |  ui-router\r\nClient Tests | Jasmine\r\nDB | MongoDB\r\nAuth | Y\r\nsocket.io | Y\r\n\r\nHi\r\n\r\nI want to know if I can use ES6 generators, both in the server and client with this generator.\r\nI just try a simple example in the server side and I get and error.\r\n\r\nThe example is:\r\n\r\n    var x = 1;\r\n\r\n    function *foo() {\r\n      x++;\r\n      yield; // pause!\r\n      console.log( \"x:\", x );\r\n    }\r\n    function bar() {\r\n     x++;\r\n    }\r\n\r\n    var it = foo();\r\n    // start `foo()` here!\r\n    it.next();\r\n    console.log(x); // 2\r\n    bar();\r\n    console.log(x); // 3\r\n    it.next(); // x: 3`\r\n\r\nAnd the error is:\r\n\r\n> var _marked = [foo].map(regeneratorRuntime.mark);\r\n>                         ^\r\n> \r\n> ReferenceError: regeneratorRuntime is not defined\r\n>     at Object.<anonymous> (D:\\002_IOT\\WS_IOT\\iotfs376\\server\\api\\data\\data_day\\data_day.socket.js:30:25)\r\n>     at Module._compile (module.js:409:26)\r\n>     at loader (D:\\002_IOT\\WS_IOT\\iotfs376\\node_modules\\babel-register\\lib\\node.js:158:5)\r\n>     at Object.require.extensions.(anonymous function) [as .js] (D:\\002_IOT\\WS_IOT\\iotfs376\\node_modules\\babel-register\\lib\\node.js:168:7)\r\n>     at Module.load (module.js:343:32)\r\n>     at Function.Module._load (module.js:300:12)\r\n>     at Module.require (module.js:353:17)\r\n>     at require (internal/module.js:12:17)\r\n>     at onConnect (socketio.js:68:3)\r\n>     at Namespace.<anonymous> (socketio.js:120:5)\r\n>     at emitOne (events.js:77:13)\r\n>     at Namespace.emit (events.js:169:7)\r\n>     at Namespace.emit (D:\\002_IOT\\WS_IOT\\iotfs376\\node_modules\\socket.io\\lib\\namespace.js:206:10)\r\n>     at D:\\002_IOT\\WS_IOT\\iotfs376\\node_modules\\socket.io\\lib\\namespace.js:174:14\r\n>     at nextTickCallbackWith0Args (node.js:420:9)\r\n>     at process._tickCallback (node.js:349:13)\r\n> \r\n\r\nThanks\r\n "}}
{"actor":{"display_login":"Awk34"}}