Angular-cli: using require('fs')

Created on 9 Mar 2017  路  5Comments  路  Source: angular/angular-cli

Hi,
I try use 'filesystem' for working with file.
but when use code: import * as fs from "fs" or var fs = require('fs'). Result of both way incorrect

All 5 comments

@loongdefect you can't use nodes filesystem api in a front end application.

Closing as answered.

Angular-CLI supports Universal now, so there is a solution needed for that now right?

I think the problem here is that people do not really get what do you mean when you just say angular and frontend you have to give a bit more details on the subject!

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings