{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/7207","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/7207/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/7207/comments","events_url":"https://api.github.com/repos/angular/angular/issues/7207/events","html_url":"https://github.com/angular/angular/issues/7207","id":135118724,"number":7207,"title":"Infinite loop using beta7","user":{"login":"albertoforesin","id":17363781,"avatar_url":"https://avatars.githubusercontent.com/u/17363781?v=3","gravatar_id":"","url":"https://api.github.com/users/albertoforesin","html_url":"https://github.com/albertoforesin","followers_url":"https://api.github.com/users/albertoforesin/followers","following_url":"https://api.github.com/users/albertoforesin/following{/other_user}","gists_url":"https://api.github.com/users/albertoforesin/gists{/gist_id}","starred_url":"https://api.github.com/users/albertoforesin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/albertoforesin/subscriptions","organizations_url":"https://api.github.com/users/albertoforesin/orgs","repos_url":"https://api.github.com/users/albertoforesin/repos","events_url":"https://api.github.com/users/albertoforesin/events{/privacy}","received_events_url":"https://api.github.com/users/albertoforesin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-20T20:49:24Z","updated_at":"2016-03-22T11:55:32Z","closed_at":null,"body":"Hi guys,\r\nI get an infinite loop using beta7, this is the Safari's stacktrace:\r\n\r\n```\r\nError: Script terminated by timeout at:\r\nDebugDomRenderer</DebugDomRenderer.prototype.createText@http://localhost:2067/node_modules/angular2/bundles/angular2.dev.js:7184:11\r\nviewFactory_t0@viewFactory_t:256:18\r\nviewFactory_t0@viewFactory_t:266:1\r\nviewFactory_t0@viewFactory_t:266:1\r\nviewFactory_t0@viewFactory_t:266:1\r\nviewFactory_t0@viewFactory_t:266:1\r\nviewFactory_t0@viewFactory_t:266:1\r\n...\r\n```\r\n\r\nMy packages:\r\n```\r\n   \"angular2\": \"2.0.0-beta.7\",\r\n    \"systemjs\": \"0.19.20\",\r\n    \"es6-promise\": \"^3.0.2\",\r\n    \"es6-shim\": \"^0.33.3\",\r\n    \"reflect-metadata\": \"0.1.2\",\r\n    \"rxjs\": \"5.0.0-beta.2\",\r\n    \"zone.js\": \"0.5.15\",\r\n```\r\n\r\nMy tsd:\r\n```\r\n{\r\n  \"version\": \"v4\",\r\n  \"repo\": \"borisyankov/DefinitelyTyped\",\r\n  \"ref\": \"master\",\r\n  \"path\": \"typings\",\r\n  \"bundle\": \"typings/tsd.d.ts\",\r\n  \"installed\": {\r\n    \"jquery/jquery.d.ts\": {\r\n      \"commit\": \"9027703c0bd831319dcdf7f3169f7a468537f448\"\r\n    },\r\n    \"bootstrap/bootstrap.d.ts\": {\r\n      \"commit\": \"9027703c0bd831319dcdf7f3169f7a468537f448\"\r\n    }\r\n  },\r\n  \"ambientDependencies\": {\r\n    \"es6-shim\": \"github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#6697d6f7dadbf5773cb40ecda35a76027e0783b2\"\r\n  }\r\n}\r\n```\r\n\r\nMy boot:\r\n```\r\n///<reference path=\"../../node_modules/angular2/typings/browser.d.ts\"/>\r\n\r\nimport {bootstrap}    from 'angular2/platform/browser'\r\nimport {AppComponent} from './app.component'\r\nimport {ROUTER_PROVIDERS} from 'angular2/router';\r\nimport {HTTP_PROVIDERS} from 'angular2/http'\r\nimport 'rxjs/add/operator/map';\r\nimport 'rxjs/add/operator/retry';\r\n\r\nbootstrap(AppComponent, [ROUTER_PROVIDERS, HTTP_PROVIDERS]);\r\n```\r\n\r\nMy rooting class:\r\n```\r\nimport {Component} from 'angular2/core';\r\nimport {RouteConfig, Router, Location, Instruction, ROUTER_DIRECTIVES} from 'angular2/router';\r\nimport {MainComponent} from './components/sections/main.component';\r\nimport {NotFoundComponent} from './components/sections/not-found.component';\r\nimport {EventEmitterService} from './services/event-emitter.service';\r\nimport {NavigationService, Routes} from './services/navigation.service'; \r\n\r\n@Component({\r\n    selector: 'my-app',\r\n    template: '<router-outlet></router-outlet>',\r\n    directives: [ROUTER_DIRECTIVES],\r\n    providers: [EventEmitterService, NavigationService]\r\n})\r\n@RouteConfig([\r\n    {path:'/' , name: Routes.Main , component: MainComponent, useAsDefault: true},\r\n    {path:'/not-found' , name: Routes.NotFound , component: NotFoundComponent}\r\n])\r\nexport class AppComponent\r\n{   \r\n    public constructor(private _router: Router, _location:Location) \r\n    {\r\n        _router.recognize(_location.path()).then((instruction: Instruction) => {\r\n            if (!instruction)\r\n                _router.recognize('/not-found').then((instruction: Instruction) => _router.navigateByInstruction(instruction, true));\r\n        });\r\n    }\r\n}\r\n\r\n```\r\n\r\nUsing beta6 everything works well."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/199777862","html_url":"https://github.com/angular/angular/issues/7207#issuecomment-199777862","issue_url":"https://api.github.com/repos/angular/angular/issues/7207","id":199777862,"user":{"login":"natewallace","id":5088993,"avatar_url":"https://avatars.githubusercontent.com/u/5088993?v=3","gravatar_id":"","url":"https://api.github.com/users/natewallace","html_url":"https://github.com/natewallace","followers_url":"https://api.github.com/users/natewallace/followers","following_url":"https://api.github.com/users/natewallace/following{/other_user}","gists_url":"https://api.github.com/users/natewallace/gists{/gist_id}","starred_url":"https://api.github.com/users/natewallace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natewallace/subscriptions","organizations_url":"https://api.github.com/users/natewallace/orgs","repos_url":"https://api.github.com/users/natewallace/repos","events_url":"https://api.github.com/users/natewallace/events{/privacy}","received_events_url":"https://api.github.com/users/natewallace/received_events","type":"User","site_admin":false},"created_at":"2016-03-22T11:55:32Z","updated_at":"2016-03-22T11:55:32Z","body":"I was just about to log a bug for this as I'm seeing it in beta 11 as well.  I think the issue is with the _createViewFactoryRuntime function in the src/compiler/template_compiler.js file.  It appears that it dynamically generates code from your components at runtime that are responsible for creating views.  This function uses the function name from your components when creating parameter, function and sub function names and the problem is that it doesn't account for the fact that different components may end up with the same function name.\r\n\r\nIn this specific case I think the component code has been minified and all the function names ended up being 't'.  This results in parameters, functions and sub functions all being named 'viewFactory_t0' which results in an infinite recursive loop occurring when trying to generate a view."}}