Guest User

Untitled

a guest
Jun 14th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import { Component, OnInit } from '@angular/core';
  2. import * as fs from 'fs';
  3.  
  4. @Component({
  5. selector: 'app-review',
  6. templateUrl: './review.component.html',
  7. styleUrls: ['./review.component.css']
  8. })
  9. export class ReviewComponent implements OnInit {
  10.  
  11. constructor() { }
  12.  
  13.  
  14. ngOnInit() {
  15.  
  16. var fs = require('fs');
  17.  
  18. fs.readdir('./assets', function (err, files) {
  19. // "files" is an Array with files names
  20. console.log(files);
  21.  
  22. });
  23. }
  24.  
  25. }
Add Comment
Please, Sign In to add comment