{"action":"created","issue":{"url":"https://api.github.com/repos/SoCreate/angular-playground/issues/158","repository_url":"https://api.github.com/repos/SoCreate/angular-playground","labels_url":"https://api.github.com/repos/SoCreate/angular-playground/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/SoCreate/angular-playground/issues/158/comments","events_url":"https://api.github.com/repos/SoCreate/angular-playground/issues/158/events","html_url":"https://github.com/SoCreate/angular-playground/issues/158","id":387357283,"node_id":"MDU6SXNzdWUzODczNTcyODM=","number":158,"title":"SandboxBuilder prepare function","user":{"login":"tfiwm","id":988473,"node_id":"MDQ6VXNlcjk4ODQ3Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/988473?v=4","gravatar_id":"","url":"https://api.github.com/users/tfiwm","html_url":"https://github.com/tfiwm","followers_url":"https://api.github.com/users/tfiwm/followers","following_url":"https://api.github.com/users/tfiwm/following{/other_user}","gists_url":"https://api.github.com/users/tfiwm/gists{/gist_id}","starred_url":"https://api.github.com/users/tfiwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfiwm/subscriptions","organizations_url":"https://api.github.com/users/tfiwm/orgs","repos_url":"https://api.github.com/users/tfiwm/repos","events_url":"https://api.github.com/users/tfiwm/events{/privacy}","received_events_url":"https://api.github.com/users/tfiwm/received_events","type":"User","site_admin":false},"labels":[{"id":938702106,"node_id":"MDU6TGFiZWw5Mzg3MDIxMDY=","url":"https://api.github.com/repos/SoCreate/angular-playground/labels/discussion","name":"discussion","color":"cc317c","default":false}],"state":"open","locked":false,"assignee":{"login":"timstoddard","id":8732414,"node_id":"MDQ6VXNlcjg3MzI0MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8732414?v=4","gravatar_id":"","url":"https://api.github.com/users/timstoddard","html_url":"https://github.com/timstoddard","followers_url":"https://api.github.com/users/timstoddard/followers","following_url":"https://api.github.com/users/timstoddard/following{/other_user}","gists_url":"https://api.github.com/users/timstoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/timstoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timstoddard/subscriptions","organizations_url":"https://api.github.com/users/timstoddard/orgs","repos_url":"https://api.github.com/users/timstoddard/repos","events_url":"https://api.github.com/users/timstoddard/events{/privacy}","received_events_url":"https://api.github.com/users/timstoddard/received_events","type":"User","site_admin":false},"assignees":[{"login":"timstoddard","id":8732414,"node_id":"MDQ6VXNlcjg3MzI0MTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8732414?v=4","gravatar_id":"","url":"https://api.github.com/users/timstoddard","html_url":"https://github.com/timstoddard","followers_url":"https://api.github.com/users/timstoddard/followers","following_url":"https://api.github.com/users/timstoddard/following{/other_user}","gists_url":"https://api.github.com/users/timstoddard/gists{/gist_id}","starred_url":"https://api.github.com/users/timstoddard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timstoddard/subscriptions","organizations_url":"https://api.github.com/users/timstoddard/orgs","repos_url":"https://api.github.com/users/timstoddard/repos","events_url":"https://api.github.com/users/timstoddard/events{/privacy}","received_events_url":"https://api.github.com/users/timstoddard/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-12-04T16:00:51Z","updated_at":"2018-12-04T19:21:18Z","closed_at":null,"author_association":"NONE","body":"Hello,\r\n\r\nis there any possibility to prepare data for each sandbox example? Do you have some possible strategies for that?\r\nWe are building presenter and smart components. So for presenter components the playground already works amazing!\r\nBut for our smart components we would like to mock the states. E.g.: state managements\r\nA prepare function would be really nice to set a state, mock http requests or any kind of code.\r\n\r\nIf there is at the moment no possibility. What do you think about this idea?\r\n"},"comment":{"url":"https://api.github.com/repos/SoCreate/angular-playground/issues/comments/444224181","html_url":"https://github.com/SoCreate/angular-playground/issues/158#issuecomment-444224181","issue_url":"https://api.github.com/repos/SoCreate/angular-playground/issues/158","id":444224181,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDIyNDE4MQ==","user":{"login":"tfiwm","id":988473,"node_id":"MDQ6VXNlcjk4ODQ3Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/988473?v=4","gravatar_id":"","url":"https://api.github.com/users/tfiwm","html_url":"https://github.com/tfiwm","followers_url":"https://api.github.com/users/tfiwm/followers","following_url":"https://api.github.com/users/tfiwm/following{/other_user}","gists_url":"https://api.github.com/users/tfiwm/gists{/gist_id}","starred_url":"https://api.github.com/users/tfiwm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfiwm/subscriptions","organizations_url":"https://api.github.com/users/tfiwm/orgs","repos_url":"https://api.github.com/users/tfiwm/repos","events_url":"https://api.github.com/users/tfiwm/events{/privacy}","received_events_url":"https://api.github.com/users/tfiwm/received_events","type":"User","site_admin":false},"created_at":"2018-12-04T19:21:18Z","updated_at":"2018-12-04T19:21:18Z","author_association":"NONE","body":"I don't think this will scale good from code perspective. This approach forces me to make my code playground compatible but it should be the opposite.\r\n\r\nWhat is if you want to test an error case of your component as \"Example 2\". There is no possibility with an argument. Therefor i would just to test if backend request is ok or fails and the reaction of the component -> http mock like in my post as an example.\r\n\r\nSo the idea is valid but in my opinion it doesn't fit a lot of use cases.\r\nE.g.: with a state management system you just subscribe in your component to some selectors. There is no way with arguments."}}
{"actor":{"display_login":"tfiwm"}}