Unable to parse Ionic Config file. Please make sure it is valid JSON (.ionic/ionic.config)
Caught exception:
SyntaxError: Unexpected token in JSON at position 0
at Object.parse (native)
at Object.load (C:\Users\phil\AppData\Roaming\npm\node_modules\ionic\node_modules\ionic-app-lib\lib\config.js:14:26)
at Object. (C:\Users\phil\AppData\Roaming\npm\node_modules\ionic\lib\utils\stats.js:31:31)
at Module._compile (module.js:570:32)
at Object.Module._extensions…js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
How did you solve the problem? Please post a bit of information so that future users having the same problem may not only find the problem but also a solution by googling. Thanks.
Thank you. but i have created a provider and it was working just okay, i was thinking there is a more simpler way to solve it.
import { Injectable } from ‘@angular/core’;
import {Http, Headers} from ‘@angular/http’;
import ‘rxjs/add/operator/map’;
I thinks the simplest way is what I just wrote above. a static class which embedded all your constant. no need to inject it. kiss (keep it simple and stupid)