angularjs smart table st-safe-src attribute -
i have gone through link http://lorenzofox3.github.io/smart-table-website/. have not got use case of "st-safe-src". when need use attribute.
i believe explanation st-safe-src :
1) have displayed collection (ie repeater) result of sort, filter, slice operations on base collection.
2) when initialised smart-table create copy of provided st-table collection base collection. sort,filter,slice based on original asset. when calling ajax, don't have dataset @ initialisation time base copy wrong. side node, rather fetch data when resolving controller dependencies (ie resolve in route) ease unit tests
3) when using st-safe-src explicitly tells smart-table watch , update base collection ie 1 uses reference when sorting, filtering , slicing.
so st-table displayed collection (the result) , st-safe-src base collection (the original dataset).
so if set both same collection, latest watched , change first one, trigger watch...which update displayed one....etc.
reference : https://github.com/lorenzofox3/smart-table/issues/156#issuecomment-54242437
Comments
Post a Comment