You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 6, 2022. It is now read-only.
Create a sidebar and set [(opened)]="sidebarOpen" autoCollapseWidth="860". If the page loads when sidebarOpen = trueand and the browser width is <860, then angular throws a "Expression has changed after it was checked" error. If the browser width is >860 then the error goes away.
Obviously, this is because opened is clashing with the auto collapse feature. Is there a known workaround for this? What I am looking to do is to have the sidebar shown by default, but if the page loads and the width is too small then it should be collapsed.
The text was updated successfully, but these errors were encountered:
joekaiser
changed the title
"Expression Has Changed" error when autoCollapseWidth is set [(opened)] is true
"Expression Has Changed" error when autoCollapseWidth is set and [(opened)] is true
May 16, 2020
Create a sidebar and set
[(opened)]="sidebarOpen" autoCollapseWidth="860"
. If the page loads whensidebarOpen = true
and and the browser width is<860
, then angular throws a "Expression has changed after it was checked" error. If the browser width is>860
then the error goes away.Obviously, this is because
opened
is clashing with the auto collapse feature. Is there a known workaround for this? What I am looking to do is to have the sidebar shown by default, but if the page loads and the width is too small then it should be collapsed.I have created a simple reproduction here https://codesandbox.io/s/ng-sidebar-error-pvr4e
Check the console for the error
The text was updated successfully, but these errors were encountered: