├── .gitignore ├── modules ├── shared │ ├── side-drawer-page │ │ ├── index.ts │ │ ├── side-drawer-page.component.css │ │ ├── side-drawer-page.component.html │ │ └── side-drawer-page.component.ts │ ├── index.ts │ ├── shared.module.ts │ └── borderless-btn.directive.ts ├── app.component.ts ├── about │ ├── about.component.html │ └── about.component.ts ├── home │ ├── home.component.html │ └── home.component.ts ├── contact │ ├── contact.component.html │ └── contact.component.ts ├── app-routing.module.ts └── app.module.ts ├── App_Resources ├── iOS │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── AppIcon.appiconset │ │ │ ├── icon-29.png │ │ │ ├── icon-40.png │ │ │ ├── icon-50.png │ │ │ ├── icon-57.png │ │ │ ├── icon-72.png │ │ │ ├── icon-76.png │ │ │ ├── icon-29@2x.png │ │ │ ├── icon-29@3x.png │ │ │ ├── icon-40@2x.png │ │ │ ├── icon-40@3x.png │ │ │ ├── icon-50@2x.png │ │ │ ├── icon-57@2x.png │ │ │ ├── icon-60@2x.png │ │ │ ├── icon-60@3x.png │ │ │ ├── icon-72@2x.png │ │ │ ├── icon-76@2x.png │ │ │ ├── icon-83.5@2x.png │ │ │ └── Contents.json │ │ ├── ic_menu_black.imageset │ │ │ ├── ic_menu.png │ │ │ ├── ic_menu_2x.png │ │ │ ├── ic_menu_3x.png │ │ │ └── Contents.json │ │ ├── LaunchImage.launchimage │ │ │ ├── Default.png │ │ │ ├── Default@2x.png │ │ │ ├── Default-568h@2x.png │ │ │ ├── Default-667h@2x.png │ │ │ ├── Default-736h@3x.png │ │ │ ├── Default-Portrait.png │ │ │ ├── Default-Landscape.png │ │ │ ├── Default-Portrait@2x.png │ │ │ ├── Default-Landscape@2x.png │ │ │ ├── Default-Landscape@3x.png │ │ │ └── Contents.json │ │ ├── LaunchScreen.Center.imageset │ │ │ ├── LaunchScreen-Center.png │ │ │ ├── LaunchScreen-Center@2x.png │ │ │ └── Contents.json │ │ └── LaunchScreen.AspectFill.imageset │ │ │ ├── LaunchScreen-AspectFill.png │ │ │ ├── LaunchScreen-AspectFill@2x.png │ │ │ └── Contents.json │ ├── build.xcconfig │ ├── Info.plist │ └── LaunchScreen.storyboard └── Android │ ├── values-v21 │ ├── colors.xml │ └── styles.xml │ ├── drawable-hdpi │ ├── icon.png │ ├── logo.png │ ├── background.png │ └── ic_menu_black.png │ ├── drawable-ldpi │ ├── icon.png │ ├── logo.png │ └── background.png │ ├── drawable-mdpi │ ├── icon.png │ ├── logo.png │ ├── background.png │ └── ic_menu_black.png │ ├── drawable-xhdpi │ ├── icon.png │ ├── logo.png │ ├── background.png │ └── ic_menu_black.png │ ├── drawable-xxhdpi │ ├── icon.png │ ├── logo.png │ ├── background.png │ └── ic_menu_black.png │ ├── drawable-xxxhdpi │ ├── icon.png │ ├── logo.png │ ├── background.png │ └── ic_menu_black.png │ ├── values │ ├── colors.xml │ └── styles.xml │ ├── drawable-nodpi │ └── splash_screen.xml │ ├── app.gradle │ └── AndroidManifest.xml ├── main.ts ├── app.css ├── LICENSE ├── README.md └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | **/*.js.map 2 | **/*.js 3 | -------------------------------------------------------------------------------- /modules/shared/side-drawer-page/index.ts: -------------------------------------------------------------------------------- 1 | export * from './side-drawer-page.component'; 2 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /modules/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './shared.module'; 2 | export * from './side-drawer-page'; 3 | export * from './borderless-btn.directive'; 4 | -------------------------------------------------------------------------------- /App_Resources/Android/values-v21/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3d5afe 4 | -------------------------------------------------------------------------------- /App_Resources/Android/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-hdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-hdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-ldpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-ldpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-mdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-mdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xhdpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxxhdpi/icon.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxxhdpi/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxxhdpi/logo.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-hdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-hdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-ldpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-ldpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-mdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-mdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-hdpi/ic_menu_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-hdpi/ic_menu_black.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-mdpi/ic_menu_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-mdpi/ic_menu_black.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxxhdpi/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxxhdpi/background.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xhdpi/ic_menu_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xhdpi/ic_menu_black.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxhdpi/ic_menu_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxhdpi/ic_menu_black.png -------------------------------------------------------------------------------- /App_Resources/Android/drawable-xxxhdpi/ic_menu_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/Android/drawable-xxxhdpi/ic_menu_black.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu_2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu_2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu_3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/ic_menu_3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png -------------------------------------------------------------------------------- /modules/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from "@angular/core"; 2 | 3 | @Component({ 4 | selector: "my-app", 5 | template: '' 6 | }) 7 | export class AppComponent { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/shripalsoni04/nativescript-angular-drawer-template/HEAD/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png -------------------------------------------------------------------------------- /App_Resources/Android/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #F5F5F5 4 | #757575 5 | #33B5E5 6 | #272734 7 | -------------------------------------------------------------------------------- /main.ts: -------------------------------------------------------------------------------- 1 | // this import should be first in order to load some required settings (like globals and reflect-metadata) 2 | import { platformNativeScriptDynamic } from "nativescript-angular/platform"; 3 | 4 | import { AppModule } from "./modules/app.module"; 5 | 6 | platformNativeScriptDynamic().bootstrapModule(AppModule); -------------------------------------------------------------------------------- /modules/about/about.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/home/home.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/contact/contact.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /modules/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'home', 5 | templateUrl: 'modules/home/home.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class HomeComponent { 9 | text: string = 'Home Page'; 10 | } 11 | -------------------------------------------------------------------------------- /modules/about/about.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'about', 5 | templateUrl: 'modules/about/about.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class AboutComponent { 9 | text: string = 'About Page'; 10 | } 11 | -------------------------------------------------------------------------------- /modules/contact/contact.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, ChangeDetectionStrategy } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'contact', 5 | templateUrl: 'modules/contact/contact.component.html', 6 | changeDetection: ChangeDetectionStrategy.OnPush 7 | }) 8 | export class ContactComponent { 9 | text: string = 'Contact Page'; 10 | } 11 | -------------------------------------------------------------------------------- /App_Resources/Android/drawable-nodpi/splash_screen.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /App_Resources/Android/app.gradle: -------------------------------------------------------------------------------- 1 | // Add your native dependencies here: 2 | 3 | // Uncomment to add recyclerview-v7 dependency 4 | //dependencies { 5 | // compile 'com.android.support:recyclerview-v7:+' 6 | //} 7 | 8 | android { 9 | defaultConfig { 10 | generatedDensities = [] 11 | applicationId = "__PACKAGE__" 12 | } 13 | aaptOptions { 14 | additionalParameters "--no-version-vectors" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-Center.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-Center@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchScreen-AspectFill.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchScreen-AspectFill@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /App_Resources/iOS/build.xcconfig: -------------------------------------------------------------------------------- 1 | // You can add custom settings here 2 | // for example you can uncomment the following line to force distribution code signing 3 | // CODE_SIGN_IDENTITY = iPhone Distribution 4 | // To build for device with XCode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html 5 | // DEVELOPMENT_TEAM = YOUR_TEAM_ID; 6 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 7 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 8 | -------------------------------------------------------------------------------- /modules/shared/side-drawer-page/side-drawer-page.component.css: -------------------------------------------------------------------------------- 1 | .sidedrawer-header { 2 | padding-top: 25; 3 | padding-bottom: 25; 4 | background-color: #333; 5 | } 6 | 7 | .sidedrawer-header .sidedrawer-header-image { 8 | margin-bottom: 10 9 | } 10 | 11 | .sidedrawer-header .sidedrawer-header-brand { 12 | font-size: 18; 13 | color: #fff; 14 | } 15 | 16 | .sidedrawer-content .sidedrawer-list-item-text { 17 | color: #777; 18 | } 19 | 20 | .sidedrawer-list-item-text.borderless-btn { 21 | text-transform: capitalize; 22 | padding-right: 20%; 23 | width: 100%; 24 | border-width: 0; 25 | } 26 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/ic_menu_black.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "filename": "ic_menu.png", 5 | "idiom": "universal", 6 | "scale": "1x" 7 | }, 8 | { 9 | "filename": "ic_menu_2x.png", 10 | "idiom": "universal", 11 | "scale": "2x" 12 | }, 13 | { 14 | "filename": "ic_menu_3x.png", 15 | "idiom": "universal", 16 | "scale": "3x" 17 | } 18 | ], 19 | "info": { 20 | "author": "xcode", 21 | "version": 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app.css: -------------------------------------------------------------------------------- 1 | /* 2 | In NativeScript, the app.css file is where you place CSS rules that 3 | you would like to apply to your entire application. Check out 4 | http://docs.nativescript.org/ui/styling for a full list of the CSS 5 | selectors and properties you can use to style UI components. 6 | */ 7 | 8 | /* 9 | In many cases you may want to use the NativeScript core theme instead 10 | of writing your own CSS rules. For a full list of class names in the theme 11 | refer to http://docs.nativescript.org/ui/theme. 12 | */ 13 | @import 'nativescript-theme-core/css/core.light.css'; 14 | 15 | .page-text { 16 | vertical-align: center; 17 | text-align: center; 18 | } 19 | -------------------------------------------------------------------------------- /modules/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { NativeScriptRouterModule } from 'nativescript-angular/router'; 4 | 5 | import { HomeComponent } from './home/home.component'; 6 | import { AboutComponent } from './about/about.component'; 7 | import { ContactComponent } from './contact/contact.component'; 8 | 9 | @NgModule({ 10 | imports: [ 11 | NativeScriptRouterModule.forRoot([ 12 | { path: '', component: HomeComponent }, 13 | { path: 'about', component: AboutComponent }, 14 | { path: 'contact', component: ContactComponent } 15 | ]) 16 | ], 17 | exports: [NativeScriptRouterModule] 18 | }) 19 | export class AppRoutingModule { 20 | 21 | } 22 | -------------------------------------------------------------------------------- /modules/shared/shared.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; 4 | import { NativeScriptUISideDrawerModule } from 'nativescript-telerik-ui/sidedrawer/angular/side-drawer-directives'; 5 | 6 | import { SideDrawerPageComponent } from './side-drawer-page'; 7 | import { BorderlessBtnDirective } from './borderless-btn.directive'; 8 | 9 | @NgModule({ 10 | imports: [ 11 | NativeScriptModule, 12 | NativeScriptUISideDrawerModule, 13 | ], 14 | declarations: [ 15 | SideDrawerPageComponent, 16 | BorderlessBtnDirective 17 | ], 18 | exports: [ 19 | SideDrawerPageComponent, 20 | BorderlessBtnDirective 21 | ] 22 | }) 23 | export class SharedModule { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /modules/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | 3 | import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; 4 | 5 | import { AppRoutingModule } from './app-routing.module'; 6 | import { AppComponent } from './app.component'; 7 | import { HomeComponent } from './home/home.component'; 8 | import { AboutComponent } from './about/about.component'; 9 | import { ContactComponent } from './contact/contact.component'; 10 | import { SharedModule } from './shared'; 11 | 12 | @NgModule({ 13 | imports: [ 14 | NativeScriptModule, 15 | AppRoutingModule, 16 | SharedModule 17 | ], 18 | declarations: [ 19 | AppComponent, 20 | HomeComponent, 21 | AboutComponent, 22 | ContactComponent 23 | ], 24 | bootstrap: [AppComponent] 25 | }) 26 | export class AppModule { 27 | 28 | } 29 | -------------------------------------------------------------------------------- /App_Resources/Android/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 14 | 15 | 16 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Nativescript-Angular-Drawer-Template 2 | A starter template to quickly create nativescript angular projects with drawer pages. 3 | 4 | ## Usage 5 | `tns create my-project-name --template nativescript-angular-drawer-template` 6 | 7 | ## Preview 8 | ### Android 9 | ![android-preview](http://ngxp.io/wp-content/product-previews/nativescript-angular-drawer-template/ns-ng-drawer-template-android.gif) 10 | 11 | ### iOS 12 | ![ios-preview](http://ngxp.io/wp-content/product-previews/nativescript-angular-drawer-template/ns-ng-drawer-template-ios.gif) 13 | 14 | ## How To Change Menu Items 15 | You can change the menu items of drawer from `app/modules/shared/side-drawer-page/side-drawer-page.component.ts` file as shown below: 16 | 17 | ``` 18 | navMenu: any[] = [ 19 | { name: 'Home', commands: ['/'] }, 20 | { name: 'About', commands: ['/about'] }, 21 | { name: 'Contact', commands: ['/contact'] } 22 | ]; 23 | ``` 24 | 25 | ## How To Create New Page 26 | You just need to wrap the content template of the new page inside `` tag as shown below: 27 | 28 | ``` 29 | 30 | 31 | 32 | 33 | 34 | ``` 35 | You can refer home, contact or about sample modules for reference. 36 | 37 | -------------------------------------------------------------------------------- /modules/shared/borderless-btn.directive.ts: -------------------------------------------------------------------------------- 1 | import { Directive, ElementRef, OnInit, OnDestroy } from '@angular/core'; 2 | 3 | import { Button } from 'ui/button'; 4 | import { isAndroid } from 'platform'; 5 | import * as application from 'application'; 6 | 7 | declare const android: any; 8 | 9 | /** 10 | * Android Only. 11 | * 12 | * Directive which removes border from the button when applied on android. 13 | */ 14 | @Directive({ 15 | selector: '.borderless-btn' 16 | }) 17 | export class BorderlessBtnDirective implements OnInit, OnDestroy { 18 | 19 | private nsBtn: Button; 20 | 21 | constructor(private _el: ElementRef) { } 22 | 23 | setBorderlessBackground() { 24 | let outValue = new android.util.TypedValue(); 25 | application.android.context.getTheme().resolveAttribute( 26 | android.R.attr.selectableItemBackground, outValue, true 27 | ); 28 | this.nsBtn.android.setBackgroundResource(outValue.resourceId); 29 | } 30 | 31 | ngOnInit() { 32 | if (isAndroid) { 33 | this.nsBtn = 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /App_Resources/Android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /App_Resources/iOS/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiresFullScreen 28 | 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nativescript-angular-drawer-template", 3 | "main": "main.js", 4 | "version": "2.0.0", 5 | "author": "Shripal Soni ", 6 | "description": "A starter template with drawer navigation for nativescript angular projects.", 7 | "license": "MIT", 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/shripalsoni04/nativescript-angular-drawer-template" 11 | }, 12 | "bugs": { 13 | "url": "https://github.com/shripalsoni04/nativescript-angular-drawer-template/issues" 14 | }, 15 | "keywords": [ 16 | "mobile", 17 | "angular", 18 | "nativescript", 19 | "{N}", 20 | "tns", 21 | "template", 22 | "drawer" 23 | ], 24 | "homepage": "https://github.com/shripalsoni04/nativescript-angular-drawer-template", 25 | "dependencies": { 26 | "@angular/common": "~4.0.0", 27 | "@angular/compiler": "~4.0.0", 28 | "@angular/core": "~4.0.0", 29 | "@angular/forms": "~4.0.0", 30 | "@angular/http": "~4.0.0", 31 | "@angular/platform-browser": "~4.0.0", 32 | "@angular/platform-browser-dynamic": "~4.0.0", 33 | "@angular/router": "~4.0.0", 34 | "nativescript-angular": "~3.0.0", 35 | "nativescript-telerik-ui": "^2.0.1", 36 | "nativescript-theme-core": "~1.0.4", 37 | "reflect-metadata": "~0.1.8", 38 | "rxjs": "~5.2.0", 39 | "tns-core-modules": "~3.0.0", 40 | "zone.js": "0.8.2" 41 | }, 42 | "devDependencies": { 43 | "babel-traverse": "6.18.0", 44 | "babel-types": "6.18.0", 45 | "babylon": "6.13.1", 46 | "lazy": "1.0.11", 47 | "nativescript-dev-typescript": "^0.4.0", 48 | "typescript": "^2.3.2", 49 | "zone.js": "~0.7.2" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /App_Resources/Android/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 18 | 19 | 21 | 22 | 23 | 31 | 32 | 34 | 35 | 36 | 42 | 43 | 45 | 46 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "29x29", 5 | "idiom" : "iphone", 6 | "filename" : "icon-29.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "29x29", 11 | "idiom" : "iphone", 12 | "filename" : "icon-29@2x.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29@3x.png", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "size" : "40x40", 23 | "idiom" : "iphone", 24 | "filename" : "icon-40@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon-40@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "57x57", 35 | "idiom" : "iphone", 36 | "filename" : "icon-57.png", 37 | "scale" : "1x" 38 | }, 39 | { 40 | "size" : "57x57", 41 | "idiom" : "iphone", 42 | "filename" : "icon-57@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon-60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "icon-60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "29x29", 59 | "idiom" : "ipad", 60 | "filename" : "icon-29.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "icon-29@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "40x40", 71 | "idiom" : "ipad", 72 | "filename" : "icon-40.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "icon-40@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "50x50", 83 | "idiom" : "ipad", 84 | "filename" : "icon-50.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "50x50", 89 | "idiom" : "ipad", 90 | "filename" : "icon-50@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "72x72", 95 | "idiom" : "ipad", 96 | "filename" : "icon-72.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "72x72", 101 | "idiom" : "ipad", 102 | "filename" : "icon-72@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "76x76", 107 | "idiom" : "ipad", 108 | "filename" : "icon-76.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "76x76", 113 | "idiom" : "ipad", 114 | "filename" : "icon-76@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "83.5x83.5", 119 | "idiom" : "ipad", 120 | "filename" : "icon-83.5@2x.png", 121 | "scale" : "2x" 122 | } 123 | ], 124 | "info" : { 125 | "version" : 1, 126 | "author" : "xcode" 127 | } 128 | } -------------------------------------------------------------------------------- /modules/shared/side-drawer-page/side-drawer-page.component.ts: -------------------------------------------------------------------------------- 1 | import { 2 | Component, ViewChild, AfterViewInit, NgZone, OnDestroy 3 | } from '@angular/core'; 4 | import { ActivatedRoute } from '@angular/router'; 5 | import { RouterExtensions } from 'nativescript-angular/router'; 6 | 7 | import { Page } from 'ui/page'; 8 | import { isAndroid, isIOS } from 'platform'; 9 | import { ActionItem } from 'ui/action-bar'; 10 | import { 11 | RadSideDrawerComponent, SideDrawerType 12 | } from 'nativescript-telerik-ui/sidedrawer/angular'; 13 | import { 14 | PushTransition, SlideInOnTopTransition 15 | } from 'nativescript-telerik-ui/sidedrawer'; 16 | 17 | @Component({ 18 | selector: 'side-drawer-page', 19 | templateUrl: 'modules/shared/side-drawer-page/side-drawer-page.component.html', 20 | styleUrls: ['modules/shared/side-drawer-page/side-drawer-page.component.css'] 21 | }) 22 | export class SideDrawerPageComponent implements AfterViewInit, OnDestroy { 23 | @ViewChild(RadSideDrawerComponent) drawerComponent: RadSideDrawerComponent; 24 | 25 | /** 26 | * On tap of any side-drawer item, hiding content if this flag is true. 27 | */ 28 | isContentVisible: boolean = true; 29 | 30 | /** 31 | * For android using SlideOnTop transition and for iOS, push transition. 32 | */ 33 | drawerTransition: any; 34 | 35 | /** 36 | * Navigation Menu Items 37 | */ 38 | navMenu: any[] = [ 39 | { name: 'Home', commands: ['/'] }, 40 | { name: 'About', commands: ['/about'] }, 41 | { name: 'Contact', commands: ['/contact'] } 42 | ]; 43 | 44 | private drawer: SideDrawerType; 45 | 46 | constructor( 47 | private routerExtensions: RouterExtensions, 48 | private activatedRoute: ActivatedRoute, 49 | private page: Page, 50 | private ngZone: NgZone 51 | ) { 52 | this.setActionBarIcon(this.page); 53 | this.setDrawerTransition(); 54 | } 55 | 56 | ngAfterViewInit() { 57 | this.drawer = this.drawerComponent.sideDrawer; 58 | } 59 | 60 | ngOnDestroy() { 61 | this.drawer.off('drawerClosed'); 62 | } 63 | 64 | toggleSideDrawer() { 65 | this.drawer.toggleDrawerState(); 66 | } 67 | 68 | /** 69 | * Navigates to next page after drawer is closed. 70 | */ 71 | navigateTo(routeCommands: any[]) { 72 | this.drawer.closeDrawer(); 73 | let currentUrl = this.routerExtensions.router.routerState.snapshot.url; 74 | let newUrlTree = this.routerExtensions.router.createUrlTree(routeCommands); 75 | let newUrl = this.routerExtensions.router.serializeUrl(newUrlTree); 76 | if (currentUrl !== newUrl) { 77 | this.isContentVisible = false; 78 | 79 | this.drawer.on('drawerClosed', () => { 80 | this.ngZone.run(() => { 81 | this.routerExtensions.navigate(routeCommands, 82 | { 83 | clearHistory: true, 84 | animated: false 85 | }); 86 | this.isContentVisible = true; 87 | this.drawer.off('drawerClosed'); 88 | }); 89 | }); 90 | } 91 | } 92 | 93 | private setDrawerTransition() { 94 | if (isAndroid) { 95 | this.drawerTransition = new SlideInOnTopTransition(); 96 | } 97 | 98 | if (isIOS) { 99 | this.drawerTransition = new PushTransition(); 100 | } 101 | } 102 | 103 | private setActionBarIcon(page: Page) { 104 | if (isAndroid) { 105 | page.actionBar.navigationButton = this.getNavigationButton(); 106 | } 107 | 108 | if (isIOS) { 109 | page.actionBar.actionItems.addItem(this.getNavigationButton()); 110 | } 111 | } 112 | 113 | private getNavigationButton() { 114 | let navActionItem = new ActionItem(); 115 | navActionItem.icon = 'res://ic_menu_black'; 116 | if (navActionItem.ios) { 117 | navActionItem.ios.position = 'left'; 118 | } 119 | navActionItem.on('tap', this.toggleDrawer.bind(this)); 120 | return navActionItem; 121 | } 122 | 123 | private toggleDrawer() { 124 | this.drawer.toggleDrawerState(); 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /App_Resources/iOS/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h@3x.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape@3x.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h@2x.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "filename" : "Default-Landscape.png", 124 | "extent" : "full-screen", 125 | "scale" : "1x" 126 | }, 127 | { 128 | "orientation" : "portrait", 129 | "idiom" : "ipad", 130 | "extent" : "to-status-bar", 131 | "scale" : "2x" 132 | }, 133 | { 134 | "orientation" : "portrait", 135 | "idiom" : "ipad", 136 | "filename" : "Default-Portrait@2x.png", 137 | "extent" : "full-screen", 138 | "scale" : "2x" 139 | }, 140 | { 141 | "orientation" : "landscape", 142 | "idiom" : "ipad", 143 | "extent" : "to-status-bar", 144 | "scale" : "2x" 145 | }, 146 | { 147 | "orientation" : "landscape", 148 | "idiom" : "ipad", 149 | "filename" : "Default-Landscape@2x.png", 150 | "extent" : "full-screen", 151 | "scale" : "2x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } --------------------------------------------------------------------------------