top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

How to preserve whitespace in Angular?

0 votes
69 views
How to preserve whitespace in Angular?
posted Apr 24, 2018 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

In Angular using preserveWhitespaces flag we can perserving whitespaces. We can use this in 2 places. either main.ts nor tsconfig.json

main.ts

platformBrowserDynamic().bootstrapModule(AppModule, { preserveWhitespaces: false });

tsconfig.json

{
  "extends": "../tsconfig.json",
  "compilerOptions": {
    "outDir": "../out-tsc/app",
    "baseUrl": "./",
    "module": "es2015",
    "types": []
  },
  "exclude": [
    "test.ts",
    "**/*.spec.ts"
  ],
  "angularCompilerOptions": {
    "preserveWhitespaces": false
  }
}
answer Apr 25, 2018 by Kuldeep Apte
Similar Questions
0 votes

I need to reuse my Javascript module in typescript for my angular application. Can you guide me how to do that ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...