The buildBreadCrumb in the constructor is the initial build for breadcrumb when the application is loaded.
The buildBreadCrumb in onInit is actually in a subscription to a router change. It means that the breadcrumb is always re-built when there is a router change. Because if some modules are lazy loaded, you wouldn't have their routes in the beginning.
Hope that clarifies :)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The buildBreadCrumb in the constructor is the initial build for breadcrumb when the application is loaded.
The buildBreadCrumb in onInit is actually in a subscription to a router change. It means that the breadcrumb is always re-built when there is a router change. Because if some modules are lazy loaded, you wouldn't have their routes in the beginning.
Hope that clarifies :)