{"action":"opened","issue":{"url":"https://api.github.com/repos/hggeorgiev/ng2-breadcrumbs/issues/16","repository_url":"https://api.github.com/repos/hggeorgiev/ng2-breadcrumbs","labels_url":"https://api.github.com/repos/hggeorgiev/ng2-breadcrumbs/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/hggeorgiev/ng2-breadcrumbs/issues/16/comments","events_url":"https://api.github.com/repos/hggeorgiev/ng2-breadcrumbs/issues/16/events","html_url":"https://github.com/hggeorgiev/ng2-breadcrumbs/issues/16","id":319238599,"number":16,"title":"ExpressionChangedAfterItHasBeenCheckedError","user":{"login":"TENDesign","id":14844983,"avatar_url":"https://avatars1.githubusercontent.com/u/14844983?v=4","gravatar_id":"","url":"https://api.github.com/users/TENDesign","html_url":"https://github.com/TENDesign","followers_url":"https://api.github.com/users/TENDesign/followers","following_url":"https://api.github.com/users/TENDesign/following{/other_user}","gists_url":"https://api.github.com/users/TENDesign/gists{/gist_id}","starred_url":"https://api.github.com/users/TENDesign/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TENDesign/subscriptions","organizations_url":"https://api.github.com/users/TENDesign/orgs","repos_url":"https://api.github.com/users/TENDesign/repos","events_url":"https://api.github.com/users/TENDesign/events{/privacy}","received_events_url":"https://api.github.com/users/TENDesign/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-01T15:51:42Z","updated_at":"2018-05-01T15:51:42Z","closed_at":null,"author_association":"NONE","body":"I am getting an ExpressionChangedAfterItHasBeenCheckedError in my component when using the BreadCrumbService store(); I tried running this on several different lifecycle hooks but all threw the same error. \r\n\r\nhere is the relevant part of the component.\r\n\r\n```\r\nconstructor(\r\n    public contactsrv: ContactsService,\r\n    private router: ActivatedRoute,\r\n    private breadcrumb: BreadcrumbsService\r\n) {\r\n    this.router.params.subscribe(\r\n        params => {\r\n            this.mediaListId = +params['ml'];\r\n            this.contactId = +params['id'];\r\n        }\r\n    );\r\n}\r\n\r\nngOnInit() {\r\n\r\n    this.breadcrumb.store([\r\n        {\r\n            label: 'Media Lists',\r\n            url: '/app-media-lists',\r\n            params: []\r\n        },\r\n        {\r\n            label: 'Media List' ,\r\n            url: `/app-media-lists/media-list/list/${this.mediaListId}`,\r\n            params: []\r\n        },\r\n        {\r\n            label: 'Contact Profile',\r\n            url: '',\r\n            params: []\r\n        }\r\n    ]);\r\n\r\n    this.getContact();\r\n    this.getTimeline();\r\n    this.getNotes();\r\n    this.getFunnel();\r\n    this.getFunnelCodeTable();\r\n\r\n}\r\n```\r\n\r\nthe breadcrumb itself is called in the app.component.html:\r\n\r\n```\r\n<ng-progress></ng-progress>\r\n<app-navbar *ngIf=\"ui\" (showEvent)=\"getToggle($event)\"></app-navbar>\r\n<app-sidebar *ngIf=\"ui\" class=\"main\" [ngClass]=\"{show: show}\"></app-sidebar>\r\n<breadcrumb *ngIf=\"ui\" [allowBootstrap]=\"true\"></breadcrumb>\r\n<app-pitching-modal></app-pitching-modal>\r\n<router-outlet></router-outlet>\r\n```\r\nand in the app.component.ts I have:\r\n\r\n```\r\nngOnInit() {\r\n\r\n    this.breadcrumbs.storePrefixed({label: 'Home' , url: '/', params: []});\r\n\r\n    if (screen.width >= 768) {\r\n        this.show = true;\r\n        return this.show;\r\n    } else {\r\n        this.show = false;\r\n        return this.show;\r\n    }\r\n\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"TENDesign"}}