What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-10-19 18:45:05
angular conditional directives
//if <div *ngIf='[condition]'> </div> //if [condition]==true the div will be shown //for <div *ngFor='let [data] of [dataArray]; let i=index;'> <h2> {{i}} {{data.title}} </h2> <img src='{{data.image}}' /> ... Add solution -
Javascript 2021-10-19 11:41:10
angular for each
//for <div *ngFor='let [data] of [dataArray]; let i=index;'> <h2> {{i}} {{data.title}} </h2> <img src='{{data.image}}' /> </div> //the data contained in an array will be displayed element by element //similar to... Add solution -
Javascript 2021-10-09 04:49:07
convery array of objects to map using immutables js
const sample = [{"id":"10","name":"Dave","urlName":"foo-bar","order":"-100","classId":"12","className":"David","classUrlName"... Add solution -
Javascript 2021-09-15 01:07:02
immutable js sort ascending and descending order
var sorted = data.get('item').sortBy((item) => -item.get('sequence')); // or var sorted = data.get('item').sortBy((item) => item.get('sequence')).reverse(); // you can now use .map() to go through your OrderedMap which has been // sortbed by the seq... Add solution