main.ts 1.2 KB

12345678910111213141516171819202122232425262728293031
  1. import { bootstrapApplication } from '@angular/platform-browser';
  2. import { RouteReuseStrategy, provideRouter, withPreloading, PreloadAllModules } from '@angular/router';
  3. import { IonicRouteStrategy, provideIonicAngular } from '@ionic/angular/standalone';
  4. import { routes } from './app/app.routes';
  5. import { AppComponent } from './app/app.component';
  6. // 引用HttpClient方法
  7. import { provideHttpClient } from '@angular/common/http';
  8. // 引用移动端授权检测供应器
  9. import { Diagnostic } from '@awesome-cordova-plugins/diagnostic/ngx';
  10. // 设置Parse服务属性
  11. import Parse from "parse";
  12. Parse.initialize("ncloudmaster");
  13. Parse.serverURL = "https://server.fmode.cn/parse";
  14. localStorage.setItem("NOVA_APIG_SERVER", 'aHR0cHMlM0ElMkYlMkZzZXJ2ZXIuZm1vZGUuY24lMkZhcGklMkZhcGlnJTJG')
  15. // 注意:替换Token 根据Token设置Parse服务帐套权限
  16. Parse.User.become('r:21b53aad9b769d6e0e1a1e23db0e0a7b')
  17. bootstrapApplication(AppComponent, {
  18. providers: [
  19. { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
  20. provideIonicAngular(),
  21. provideRouter(routes, withPreloading(PreloadAllModules)),
  22. // 添加HttpClient供应器
  23. provideHttpClient(),
  24. // 添加Diagnostic
  25. Diagnostic,
  26. ],
  27. });