{"action":"created","issue":{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1877","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/1877/labels{/name}","comments_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1877/comments","events_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1877/events","html_url":"https://github.com/angular-fullstack/generator-angular-fullstack/issues/1877","id":154118939,"number":1877,"title":"Not doing the 2 promise","user":{"login":"deniz946","id":10478058,"avatar_url":"https://avatars.githubusercontent.com/u/10478058?v=3","gravatar_id":"","url":"https://api.github.com/users/deniz946","html_url":"https://github.com/deniz946","followers_url":"https://api.github.com/users/deniz946/followers","following_url":"https://api.github.com/users/deniz946/following{/other_user}","gists_url":"https://api.github.com/users/deniz946/gists{/gist_id}","starred_url":"https://api.github.com/users/deniz946/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniz946/subscriptions","organizations_url":"https://api.github.com/users/deniz946/orgs","repos_url":"https://api.github.com/users/deniz946/repos","events_url":"https://api.github.com/users/deniz946/events{/privacy}","received_events_url":"https://api.github.com/users/deniz946/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-10T22:13:37Z","updated_at":"2016-05-10T22:15:35Z","closed_at":null,"body":"Hello, i've this constructor in the controller, and my second promise(inside of the first promise) is not working..\r\n\r\n```\r\nclass DetailedArticleComponent {\r\n\t\tconstructor($stateParams, articlesFactory, Auth, $window) {\r\n\t\t\tthis.message = 'Hello';\r\n\t\t\tthis.stateParams = $stateParams;\r\n\t\t\tthis.slug = this.stateParams.slug;\r\n\t\t\tthis.Auth = Auth;\r\n\t\t\tthis.window = $window;\r\n\r\n\t\t\tthis.articlesFactory = articlesFactory;\r\n\t\t\tthis.articlesFactory.getArticleBySlug(this.slug).success(article=>{\r\n\t\t\t\tthis.article = article[0];\r\n\t\t\t\tconsole.log(this.article);\r\n\t\t\t\tthis.articlesFactory.getComments(this.article._id).success(comments=> {\r\n\t\t\t\t\tconsole.info(comments)\r\n\t\t\t\t\tthis.comments = comments;\r\n\t\t\t\t\tthis.commentsCout = comments.length; \r\n\t\t\t\t});\r\n\t\t\t});\r\n\r\n\r\n\t\t\tthis.comment = {};\r\n\t\t}\r\n```\r\nthe 2 promises:\r\n\r\n```\r\nthis.articlesFactory.getArticleBySlug(this.slug).success(article=>{\r\n\t\t\t\tthis.article = article[0];\r\n\t\t\t\tconsole.log(this.article);\r\n\t\t\t\tthis.articlesFactory.getComments(this.article._id).success(comments=> {\r\n\t\t\t\t\tconsole.info(comments)\r\n\t\t\t\t\tthis.comments = comments;\r\n\t\t\t\t\tthis.commentsCout = comments.length; \r\n\t\t\t\t});\r\n\t\t\t});\r\n```\r\n\r\nI get this error \r\n\r\n```\r\nypeError: _this.articlesFactory.getComments is not a function\r\n    at detailedArticle.controller.ts:16\r\n    at angular.js:11255\r\n    at processQueue (angular.js:15961)\r\n    at angular.js:15977\r\n    at Scope.$eval (angular.js:17229)\r\n    at Scope.$digest (angular.js:17045)\r\n    at Scope.$apply (angular.js:17337)\r\n    at done (angular.js:11572)\r\n    at completeRequest (angular.js:11778)\r\n    at XMLHttpRequest.requestLoaded (angular.js:11711)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/comments/218308263","html_url":"https://github.com/angular-fullstack/generator-angular-fullstack/issues/1877#issuecomment-218308263","issue_url":"https://api.github.com/repos/angular-fullstack/generator-angular-fullstack/issues/1877","id":218308263,"user":{"login":"deniz946","id":10478058,"avatar_url":"https://avatars.githubusercontent.com/u/10478058?v=3","gravatar_id":"","url":"https://api.github.com/users/deniz946","html_url":"https://github.com/deniz946","followers_url":"https://api.github.com/users/deniz946/followers","following_url":"https://api.github.com/users/deniz946/following{/other_user}","gists_url":"https://api.github.com/users/deniz946/gists{/gist_id}","starred_url":"https://api.github.com/users/deniz946/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deniz946/subscriptions","organizations_url":"https://api.github.com/users/deniz946/orgs","repos_url":"https://api.github.com/users/deniz946/repos","events_url":"https://api.github.com/users/deniz946/events{/privacy}","received_events_url":"https://api.github.com/users/deniz946/received_events","type":"User","site_admin":false},"created_at":"2016-05-10T22:15:35Z","updated_at":"2016-05-10T22:15:35Z","body":"Don't know why but after restarting several times the server it worked, sorry for the issue, it had me crazy, not working around 40 minutes..."}}