Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Commit

Permalink
Ionic Cloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Manduro committed Jun 13, 2016
1 parent cc59aba commit 261d227
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
15 changes: 7 additions & 8 deletions app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { provide } from '@angular/core';
import { Http } from '@angular/http';
import { ionicBootstrap } from 'ionic-angular';
import { AuthConfig, AuthHttp } from 'angular2-jwt';
import { providers as ionicPlatformProviders } from '@ionic/platform-client-angular';
import { CloudSettings, provideCloud } from '@ionic/cloud-angular';

import { LustrumApp } from './app';
import { ApiData } from './services/api-data';
import { AuthService } from './services/auth';
import { NotificationService } from './services/notification';


let ionicPlatformConfig = {
const cloudSettings: CloudSettings = {
core: {
app_id: 'b4141034',
gcm_key: '335763697269',
Expand All @@ -34,7 +34,7 @@ let ionicPlatformConfig = {
}
};

let ionicConfig = {
const ionicConfig = {
prodMode: true,
tabbarLayout: 'title-hide',
platforms: {
Expand All @@ -45,7 +45,7 @@ let ionicConfig = {
}
};

let jwtProvider = provide(AuthHttp, {
const jwtProvider = provide(AuthHttp, {
useFactory: (http) => {
return new AuthHttp(new AuthConfig({
headerName: 'X-Csr-Authorization'
Expand All @@ -54,13 +54,12 @@ let jwtProvider = provide(AuthHttp, {
deps: [Http]
});

let providers = [
const providers = [
ApiData,
AuthService,
NotificationService,
jwtProvider
jwtProvider,
provideCloud(cloudSettings)
];

providers.push(...ionicPlatformProviders(ionicPlatformConfig));

ionicBootstrap(LustrumApp, providers, ionicConfig);
2 changes: 1 addition & 1 deletion app/services/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Headers, Http } from '@angular/http';
import { AuthHttp, JwtHelper, tokenNotExpired } from 'angular2-jwt';
import { LocalStorage, Platform, SqlStorage, Storage } from 'ionic-angular';
import { Observable } from 'rxjs/Rx';
import { Analytics, Push } from '@ionic/platform-client-angular';
import { Analytics, Push } from '@ionic/cloud-angular';

import { AppSettings } from '../constants/app-settings';

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"url": "https://github.com/manduro/onontdekt.git"
},
"scripts": {
"build": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-app",
"build": "gulp --gulpfile test/gulpfile.ts --release --cwd ./ build-app",
"e2e": "gulp --gulpfile test/gulpfile.ts --cwd ./ build-e2e && protractor test/protractor.conf.js",
"karma": "gulp --gulpfile test/gulpfile.ts --cwd ./ karma-debug",
"postinstall": "ionic state restore && typings install && webdriver-manager update && cp test/karma-static/*.html node_modules/karma/static",
Expand All @@ -22,7 +22,7 @@
"@angular/platform-browser": "2.0.0-rc.1",
"@angular/platform-browser-dynamic": "2.0.0-rc.1",
"@angular/router": "2.0.0-rc.1",
"@ionic/platform-client-angular": "0.0.8",
"@ionic/cloud-angular": "0.0.10",
"angular2-jwt": "0.1.16",
"es6-shim": "0.35.1",
"ionic-angular": "2.0.0-beta.8",
Expand Down

0 comments on commit 261d227

Please sign in to comment.