Save generated XML view to file


#1

In my nativescript angular app, I am generating a listview in a component like so:

 <ListView [items]="viewForSave" class="list-group">
            <template let-item="item" let-i="index">
                        <GridLayout rows="auto auto">
                            <Label  [text]="i+1" row="0" >
                            <Label text="item.name" row = "1"></Label>
                         </GridLayout>
         </template>
</ListView>
<Button text="Save View" (tap)="saveView()"> </Button>
                            

the above view generates a list of items. I would like to save the elements displayed in this view as an XML/Html file in the file system. Would greatly appreciate any inputs on how I can go about this.

Thanks