angular - ngFor with localStorage -


i got problem ngfor, im doing ngfor 1 array in order create cards images, array contains urls, when add new url card image show when reload url gone array

<div class="card" *ngfor="let url of array"> 

and got add url in array

this.array.push(url); 

so told need localstorage wont loose data did this

  test1=localstorage.setitem("arrayurl", json.stringify(this.array));   local = json.parse(localstorage.getitem("arrayurl")); 

after did

    <div class="card" *ngfor="let url of local"> 

but not working because images not being displayed when adding array, have add url array or localstorage or where? , how manage create thoose card images ngfor , make them permanently


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -