{"action":"created","issue":{"url":"https://api.github.com/repos/verybigman/bem-ng/issues/4","labels_url":"https://api.github.com/repos/verybigman/bem-ng/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/verybigman/bem-ng/issues/4/comments","events_url":"https://api.github.com/repos/verybigman/bem-ng/issues/4/events","html_url":"https://github.com/verybigman/bem-ng/issues/4","id":43482653,"number":4,"title":"Add technology for building AngularJS views in module directory","user":{"login":"verybigman","id":982072,"avatar_url":"https://avatars.githubusercontent.com/u/982072?v=3","gravatar_id":"","url":"https://api.github.com/users/verybigman","html_url":"https://github.com/verybigman","followers_url":"https://api.github.com/users/verybigman/followers","following_url":"https://api.github.com/users/verybigman/following{/other_user}","gists_url":"https://api.github.com/users/verybigman/gists{/gist_id}","starred_url":"https://api.github.com/users/verybigman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybigman/subscriptions","organizations_url":"https://api.github.com/users/verybigman/orgs","repos_url":"https://api.github.com/users/verybigman/repos","events_url":"https://api.github.com/users/verybigman/events{/privacy}","received_events_url":"https://api.github.com/users/verybigman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/verybigman/bem-ng/labels/feature","name":"feature","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/verybigman/bem-ng/milestones/1","html_url":"https://github.com/verybigman/bem-ng/milestones/v1.0.0","labels_url":"https://api.github.com/repos/verybigman/bem-ng/milestones/1/labels","id":775623,"number":1,"title":"v1.0.0","description":"Use it. Taste it.","creator":{"login":"verybigman","id":982072,"avatar_url":"https://avatars.githubusercontent.com/u/982072?v=3","gravatar_id":"","url":"https://api.github.com/users/verybigman","html_url":"https://github.com/verybigman","followers_url":"https://api.github.com/users/verybigman/followers","following_url":"https://api.github.com/users/verybigman/following{/other_user}","gists_url":"https://api.github.com/users/verybigman/gists{/gist_id}","starred_url":"https://api.github.com/users/verybigman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/verybigman/subscriptions","organizations_url":"https://api.github.com/users/verybigman/orgs","repos_url":"https://api.github.com/users/verybigman/repos","events_url":"https://api.github.com/users/verybigman/events{/privacy}","received_events_url":"https://api.github.com/users/verybigman/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2014-09-02T17:54:01Z","updated_at":"2014-09-25T13:26:42Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2014-09-22T13:27:23Z","updated_at":"2015-05-08T14:56:21Z","closed_at":null,"body":"Inspire from [here](https://github.com/bem/bem-core/blob/v2/.bem/techs/node.js.js)\r\n\r\nBuild in fork process and separate from another js."},"comment":{"url":"https://api.github.com/repos/verybigman/bem-ng/issues/comments/100261686","html_url":"https://github.com/verybigman/bem-ng/issues/4#issuecomment-100261686","issue_url":"https://api.github.com/repos/verybigman/bem-ng/issues/4","id":100261686,"user":{"login":"Guria","id":36270,"avatar_url":"https://avatars.githubusercontent.com/u/36270?v=3","gravatar_id":"","url":"https://api.github.com/users/Guria","html_url":"https://github.com/Guria","followers_url":"https://api.github.com/users/Guria/followers","following_url":"https://api.github.com/users/Guria/following{/other_user}","gists_url":"https://api.github.com/users/Guria/gists{/gist_id}","starred_url":"https://api.github.com/users/Guria/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Guria/subscriptions","organizations_url":"https://api.github.com/users/Guria/orgs","repos_url":"https://api.github.com/users/Guria/repos","events_url":"https://api.github.com/users/Guria/events{/privacy}","received_events_url":"https://api.github.com/users/Guria/received_events","type":"User","site_admin":false},"created_at":"2015-05-08T14:56:21Z","updated_at":"2015-05-08T14:56:21Z","body":"I have an enb tech:\r\n```js\r\nvar vow = require('vow');\r\n\r\nmodule.exports = require('enb/lib/build-flow').create()\r\n    .name('angular-templates')\r\n    .useFileList(['tmpl.html'])\r\n    .target('target', 'templates.html')\r\n    .justJoinFiles(function (filename, data) {\r\n        return '<script type=\"text/ng-template\" id=\"' + filename.split('/').pop() + '\">\\n' + data + '\\n</script>';\r\n    })\r\n    .createTech();\r\n```\r\nand supporting code in main app:\r\n```js\r\nangular.module('app', ['ui.router', 'angular-bem'])\r\n    .config(['$urlRouterProvider',\r\n        function($urlRouterProvider) {\r\n            $urlRouterProvider.otherwise('/');\r\n        }\r\n    ]).run(function($http, $compile, $urlRouter, $rootScope){\r\n        // make a chance to load templates before state change\r\n        var un = $rootScope.$on('$stateChangeStart', function (event) {\r\n            event.preventDefault();\r\n        });\r\n\r\n        // get and compile templates\r\n        $http.get('templates.html')\r\n            .then(function(response){\r\n                response.data.length &&\r\n                    $compile(response.data);\r\n                // now we can safely set an state\r\n                un();\r\n                $urlRouter.sync();\r\n            });\r\n    });\r\n```\r\n"}}