Skip to content

Commit b20470d

Browse files
authored
Merge pull request yannbf#14 from yannbf/ionic2final
Migrate to Ionic 2 Final
2 parents ca6eeef + 44d5394 commit b20470d

31 files changed

+406
-300
lines changed

.io-config.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

config.xml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2-
<widget id="com.ionicframework.ionic2components639837" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3-
<name>Ionic2Components</name>
2+
<widget id="com.braga.advancedionic2components.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
3+
<name>Advanced Ionic2 Components</name>
44
<description>An awesome Ionic/Cordova app.</description>
55
<author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</author>
66
<content src="index.html"/>
77
<access origin="*"/>
8+
<allow-navigation href="http://ionic.local/*"/>
89
<allow-intent href="http://*/*"/>
910
<allow-intent href="https://*/*"/>
1011
<allow-intent href="tel:*"/>
@@ -23,20 +24,16 @@
2324
<preference name="DisallowOverscroll" value="true"/>
2425
<preference name="android-minSdkVersion" value="16"/>
2526
<preference name="BackupWebStorage" value="none"/>
26-
<preference name="SplashScreenDelay" value="0"/>
27-
<preference name="FadeSplashScreen" value="false"/>
28-
<preference name="FadeSplashScreenDuration" value="0"/>
29-
<preference name="SplashScreenBackgroundColor" value="0xFFFFFFFF"/>
27+
<preference name="SplashMaintainAspectRatio" value="true"/>
28+
<preference name="FadeSplashScreenDuration" value="300"/>
29+
<preference name="SplashShowOnlyFirstTime" value="false"/>
3030
<feature name="StatusBar">
3131
<param name="ios-package" onload="true" value="CDVStatusBar"/>
3232
</feature>
33-
<plugin name="cordova-plugin-device" spec="~1.1.3"/>
34-
<plugin name="cordova-plugin-console" spec="~1.0.4"/>
35-
<plugin name="cordova-plugin-whitelist" spec="~1.3.0"/>
36-
<plugin name="cordova-plugin-splashscreen" spec="~4.0.0"/>
37-
<plugin name="cordova-plugin-statusbar" spec="~2.2.0"/>
3833
<plugin name="ionic-plugin-keyboard" spec="~2.2.1"/>
39-
<plugin name="cordova-plugin-camera" spec="~2.3.0"/>
40-
<plugin name="card.io.cordova.mobilesdk" spec="https://github.com/card-io/card.io-Cordova-Plugin"/>
41-
<allow-navigation href="http://192.168.153.117:8100"/>
34+
<plugin name="cordova-plugin-whitelist" spec="1.3.1"/>
35+
<plugin name="cordova-plugin-console" spec="1.0.5"/>
36+
<plugin name="cordova-plugin-statusbar" spec="2.2.1"/>
37+
<plugin name="cordova-plugin-device" spec="1.1.4"/>
38+
<plugin name="cordova-plugin-splashscreen" spec="~4.0.1"/>
4239
</widget>

ionic.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "Ionic2Components",
3-
"app_id": "5b5dc3a7",
2+
"name": "Advanced Ionic2 Components",
3+
"app_id": "",
44
"v2": true,
55
"typescript": true
66
}

package.json

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,46 +4,44 @@
44
"homepage": "http://ionicframework.com/",
55
"private": true,
66
"scripts": {
7+
"clean": "ionic-app-scripts clean",
78
"build": "ionic-app-scripts build",
8-
"watch": "ionic-app-scripts watch",
9-
"serve:before": "watch",
10-
"emulate:before": "build",
11-
"deploy:before": "build",
12-
"build:before": "build",
13-
"run:before": "build"
9+
"ionic:build": "ionic-app-scripts build",
10+
"ionic:serve": "ionic-app-scripts serve"
1411
},
1512
"dependencies": {
16-
"@angular/common": "2.0.0",
17-
"@angular/compiler": "2.0.0",
18-
"@angular/compiler-cli": "0.6.2",
19-
"@angular/core": "2.0.0",
20-
"@angular/forms": "2.0.0",
21-
"@angular/http": "2.0.0",
22-
"@angular/platform-browser": "2.0.0",
23-
"@angular/platform-browser-dynamic": "2.0.0",
24-
"@angular/platform-server": "2.0.0",
25-
"@ionic/storage": "1.1.6",
13+
"@angular/common": "2.2.1",
14+
"@angular/compiler": "2.2.1",
15+
"@angular/compiler-cli": "2.2.1",
16+
"@angular/core": "2.2.1",
17+
"@angular/forms": "2.2.1",
18+
"@angular/http": "2.2.1",
19+
"@angular/platform-browser": "2.2.1",
20+
"@angular/platform-browser-dynamic": "2.2.1",
21+
"@angular/platform-server": "2.2.1",
22+
"@ionic/storage": "1.1.7",
2623
"angular2-swing": "^0.10.0",
27-
"chart.js": "^2.4.0",
28-
"ionic-angular": "2.0.0-rc.1",
29-
"ionic-native": "2.2.3",
24+
"ionic-angular": "2.1.0",
25+
"ionic-native": "2.4.1",
3026
"ionicons": "3.0.0",
3127
"moment": "^2.15.2",
28+
"chart.js": "^2.4.0",
3229
"rxjs": "5.0.0-beta.12",
33-
"zone.js": "0.6.21"
30+
"sw-toolbox": "3.4.0",
31+
"zone.js": "0.6.26"
3432
},
3533
"devDependencies": {
36-
"@ionic/app-scripts": "^0.0.36",
37-
"typescript": "^2.0.3"
34+
"@ionic/app-scripts": "1.1.3",
35+
"typescript": "2.0.9"
3836
},
39-
"description": "Ionic2Components: An Ionic project",
4037
"cordovaPlugins": [
41-
"cordova-plugin-device",
42-
"cordova-plugin-console",
4338
"cordova-plugin-whitelist",
44-
"cordova-plugin-splashscreen",
39+
"cordova-plugin-console",
4540
"cordova-plugin-statusbar",
41+
"cordova-plugin-device",
42+
"cordova-plugin-splashscreen",
4643
"ionic-plugin-keyboard"
4744
],
48-
"cordovaPlatforms": []
45+
"cordovaPlatforms": [],
46+
"description": "Advanced Ionic2 Components: An Awesome Ionic project"
4947
}

resources/ios/icon/icon-40@3x.png

5.87 KB
Loading

resources/ios/icon/icon-83.5@2x.png

9.34 KB
Loading

src/app/app.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class MyApp {
3838
{ title: 'Lists', component: ListsPage },
3939
{ title: 'Cards', component: CardListPage },
4040
{ title: 'Modals', component: ModalsPage },
41+
// Removed for now as there were breaking changes in slides
4142
{ title: 'Slides', component: SlidesPage },
4243
{ title: 'Popup Menu', component: PopupMenuListPage },
4344
{ title: 'Profile', component: ProfileListPage },

src/app/app.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
<div class="{{global.state['theme']}}">
2-
<ion-menu [content]="content" id="menu-components" class="animated-menu">
3-
<ion-header>
4-
<ion-toolbar>
5-
<ion-title>Menu</ion-title>
6-
</ion-toolbar>
7-
</ion-header>
8-
<ion-content>
9-
<ion-list>
10-
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
2+
<ion-menu [content]="content" id="menu-components" class="animated-menu">
3+
<ion-header>
4+
<ion-toolbar>
5+
<ion-title>Menu</ion-title>
6+
</ion-toolbar>
7+
</ion-header>
8+
<ion-content>
9+
<ion-list>
10+
<button menuClose ion-item *ngFor="let p of pages" (click)="openPage(p)">
1111
{{p.title}}
1212
</button>
13-
</ion-list>
14-
</ion-content>
15-
</ion-menu>
16-
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
17-
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
18-
</div>
13+
</ion-list>
14+
</ion-content>
15+
</ion-menu>
16+
<!-- Disable swipe-to-go-back because it's poor UX to combine STGB with side menus -->
17+
<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>
18+
</div>

src/app/app.imports.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ import { MessagesPage } from '../pages/miscellaneous/chat/messages/messages';
8585
import { ChatsPage } from '../pages/miscellaneous/chat/chats';
8686
import { BlogPostPage } from '../pages/miscellaneous/blog-post/blog-post';
8787
import { CreditCardScanPage } from '../pages/miscellaneous/credit-card-scan/credit-card-scan';
88+
import { RuntimePermissionsPage } from '../pages/miscellaneous/runtime-permissions/runtime-permissions';
8889

8990
// Providers
9091
import { WeatherService } from '../pages/miscellaneous/weather/weather.service';
@@ -93,6 +94,7 @@ import { AlertService } from '../providers/util/alert.service';
9394

9495
// Directives
9596
import { Timer } from '../components/countdown-timer/timer';
97+
import { SlidingDrawer } from '../components/sliding-drawer/sliding-drawer';
9698
import { TypingEffect } from '../components/typing-effect/typing-effect';
9799

98100
// Pipes
@@ -139,6 +141,7 @@ export const Pages = [
139141
MessagesPage,
140142
BlogPostPage,
141143
ChartsPage,
144+
RuntimePermissionsPage,
142145

143146
// Cards
144147
CardListPage,
@@ -200,6 +203,7 @@ export const Providers = [
200203
]
201204

202205
export const Directives = [
206+
SlidingDrawer,
203207
Timer,
204208
TypingEffect,
205209
]

src/app/app.module.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
import { NgModule, ErrorHandler } from '@angular/core';
2+
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
13
import { MyApp } from './app.component';
2-
import { NgModule } from '@angular/core';
3-
import { IonicApp, IonicModule } from 'ionic-angular';
4+
import { Page1 } from '../pages/page1/page1';
5+
import { Page2 } from '../pages/page2/page2';
46
import { SwingModule } from 'angular2-swing';
57

68
import { Pages, Directives, Pipes, Providers } from './app.imports';
@@ -13,7 +15,7 @@ import { Pages, Directives, Pipes, Providers } from './app.imports';
1315
// Pages
1416
Pages,
1517

16-
// directives
18+
// directives
1719
Directives,
1820

1921
// pipes
@@ -28,6 +30,6 @@ import { Pages, Directives, Pipes, Providers } from './app.imports';
2830
MyApp,
2931
Pages
3032
],
31-
providers: [Providers]
33+
providers: [Providers, { provide: ErrorHandler, useClass: IonicErrorHandler }]
3234
})
3335
export class AppModule { }

src/app/app.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,3 @@
4141
.round {
4242
border-radius: 3%;
4343
}
44-

src/app/main.prod.ts

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<ion-content>
2+
<ng-content></ng-content>
3+
</ion-content>
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sliding-drawer {
2+
width: 100%;
3+
height: 100%;
4+
position: absolute;
5+
z-index: 10 !important;
6+
box-shadow: 0px -4px 22px -8px rgba(0,0,0,0.75);
7+
}

0 commit comments

Comments
 (0)