The angular instruction is executed twice with different attribute values

in the business, an angularJS instruction is written,
html:

 <ss-menu-directive search-mode="false"></ss-menu-directive>

JS:
console.log (attr.searchMode) in the link function;
print result:

there are two questions: why does the link function execute twice? Why do you get the value of the attribute twice, get the false, once, and undefined? the second time?
A novice, if the problem is shallow, I beg your pardon, thank you!

Mar.06,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3fa77-2b9f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3fa77-2b9f9.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?