如何在Angular 2中為特定路由實(shí)現(xiàn)RouteReuseStrategy shouldDetach我有一個(gè)Angular 2模塊,我在其中實(shí)現(xiàn)了路由,并希望在導(dǎo)航時(shí)存儲狀態(tài)。用戶應(yīng)該能夠:1。使用搜索公式搜索文檔2.導(dǎo)航到其中一個(gè)結(jié)果3.導(dǎo)航回searchresult - 無需與服務(wù)器通信這可能包括RouteReuseStrategy。問題是:如何實(shí)現(xiàn)不應(yīng)存儲文檔?那么應(yīng)該存儲路徑路徑“文檔”的狀態(tài),并且不應(yīng)存儲路徑路徑“documents /:id”'狀態(tài)?
如何在Angular 2中為特定路由實(shí)現(xiàn)RouteReuseStrategy
SMILET
2019-08-06 14:14:46