├── .editorconfig ├── .gitignore ├── README.md ├── config.xml ├── ionic.config.json ├── package.json ├── resources ├── android │ ├── icon │ │ ├── drawable-hdpi-icon.png │ │ ├── drawable-ldpi-icon.png │ │ ├── drawable-mdpi-icon.png │ │ ├── drawable-xhdpi-icon.png │ │ ├── drawable-xxhdpi-icon.png │ │ └── drawable-xxxhdpi-icon.png │ └── splash │ │ ├── drawable-land-hdpi-screen.png │ │ ├── drawable-land-ldpi-screen.png │ │ ├── drawable-land-mdpi-screen.png │ │ ├── drawable-land-xhdpi-screen.png │ │ ├── drawable-land-xxhdpi-screen.png │ │ ├── drawable-land-xxxhdpi-screen.png │ │ ├── drawable-port-hdpi-screen.png │ │ ├── drawable-port-ldpi-screen.png │ │ ├── drawable-port-mdpi-screen.png │ │ ├── drawable-port-xhdpi-screen.png │ │ ├── drawable-port-xxhdpi-screen.png │ │ └── drawable-port-xxxhdpi-screen.png ├── icon.png ├── icon.png.md5 ├── ios │ ├── icon │ │ ├── icon-1024.png │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-83.5@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ └── splash │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default-667h.png │ │ ├── Default-736h.png │ │ ├── Default-Landscape-736h.png │ │ ├── Default-Landscape@2x~ipad.png │ │ ├── Default-Landscape@~ipadpro.png │ │ ├── Default-Landscape~ipad.png │ │ ├── Default-Portrait@2x~ipad.png │ │ ├── Default-Portrait@~ipadpro.png │ │ ├── Default-Portrait~ipad.png │ │ ├── Default@2x~iphone.png │ │ ├── Default@2x~universal~anyany.png │ │ └── Default~iphone.png ├── splash.png └── splash.png.md5 ├── src ├── app │ ├── app.component.js │ ├── app.component.js.map │ ├── app.component.ts │ ├── app.html │ ├── app.module.js │ ├── app.module.js.map │ ├── app.module.ts │ ├── app.scss │ ├── main.js │ ├── main.js.map │ └── main.ts ├── assets │ └── icon │ │ └── favicon.ico ├── index.html ├── manifest.json ├── pages │ ├── googleplay-tabs │ │ ├── googleplay-tabs.html │ │ ├── googleplay-tabs.module.ts │ │ ├── googleplay-tabs.scss │ │ └── googleplay-tabs.ts │ ├── home │ │ ├── home.html │ │ ├── home.js │ │ ├── home.js.map │ │ ├── home.scss │ │ └── home.ts │ └── many-tabs │ │ ├── many-tabs.html │ │ ├── many-tabs.js │ │ ├── many-tabs.js.map │ │ ├── many-tabs.scss │ │ └── many-tabs.ts ├── service-worker.js └── theme │ └── variables.scss ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent coding styles between different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | indent_style = space 8 | indent_size = 2 9 | 10 | # We recommend you to keep these unchanged 11 | end_of_line = lf 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Specifies intentionally untracked files to ignore when using Git 2 | # http://git-scm.com/docs/gitignore 3 | 4 | *~ 5 | *.sw[mnpcod] 6 | *.log 7 | *.tmp 8 | *.tmp.* 9 | log.txt 10 | *.sublime-project 11 | *.sublime-workspace 12 | .vscode/ 13 | npm-debug.log* 14 | 15 | .idea/ 16 | .sourcemaps/ 17 | .sass-cache/ 18 | .tmp/ 19 | .versions/ 20 | coverage/ 21 | dist/ 22 | node_modules/ 23 | tmp/ 24 | temp/ 25 | hooks/ 26 | platforms/ 27 | plugins/ 28 | plugins/android.json 29 | plugins/ios.json 30 | www/ 31 | $RECYCLE.BIN/ 32 | 33 | .DS_Store 34 | Thumbs.db 35 | UserInterfaceState.xcuserstate 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This is a starter template for swipedTabs in ionic 3 . 2 | 3 | # a simple example using swiped tabs IONIC 3 4 | 5 | 6 | [Youtube Link](https://www.youtube.com/watch?v=dJTFt0aeRUo&feature=youtu.be)
7 | ![](ionic3SwipedTabs.gif)
8 | 9 | #Need Custom Work? 10 | If you need help with your Ionic apps, if you need a specific plugin or integration. Let's get in touch. I'll be glad to develop or advise you for your app! Email me at karraysoufien@gmail.com. 11 | 12 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | MyApp 4 | An awesome Ionic/Cordova app. 5 | Ionic Framework Team 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ionic.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blanck", 3 | "app_id": "", 4 | "type": "ionic-angular", 5 | "integrations": { 6 | "cordova": {} 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blanck", 3 | "version": "0.0.1", 4 | "author": "Ionic Framework", 5 | "homepage": "http://ionicframework.com/", 6 | "private": true, 7 | "scripts": { 8 | "clean": "ionic-app-scripts clean", 9 | "build": "ionic-app-scripts build", 10 | "lint": "ionic-app-scripts lint", 11 | "ionic:build": "ionic-app-scripts build", 12 | "ionic:serve": "ionic-app-scripts serve" 13 | }, 14 | "dependencies": { 15 | "@angular/common": "4.1.3", 16 | "@angular/compiler": "4.1.3", 17 | "@angular/compiler-cli": "4.1.3", 18 | "@angular/core": "4.1.3", 19 | "@angular/forms": "4.1.3", 20 | "@angular/http": "4.1.3", 21 | "@angular/platform-browser": "4.1.3", 22 | "@angular/platform-browser-dynamic": "4.1.3", 23 | "@ionic-native/core": "3.12.1", 24 | "@ionic-native/splash-screen": "3.12.1", 25 | "@ionic-native/status-bar": "3.12.1", 26 | "@ionic/storage": "2.0.1", 27 | "cordova-android": "^6.2.3", 28 | "cordova-ios": "^4.4.0", 29 | "cordova-plugin-console": "^1.0.5", 30 | "cordova-plugin-device": "^1.1.4", 31 | "cordova-plugin-splashscreen": "^4.0.3", 32 | "cordova-plugin-statusbar": "^2.2.2", 33 | "cordova-plugin-whitelist": "^1.3.1", 34 | "ionic-angular": "3.6.1", 35 | "ionic-plugin-keyboard": "^2.2.1", 36 | "ionicons": "3.0.0", 37 | "rxjs": "5.4.0", 38 | "sw-toolbox": "3.6.0", 39 | "zone.js": "0.8.12" 40 | }, 41 | "devDependencies": { 42 | "@ionic/app-scripts": "2.1.4", 43 | "typescript": "2.3.4" 44 | }, 45 | "description": "An Ionic project", 46 | "cordova": { 47 | "plugins": { 48 | "cordova-plugin-console": {}, 49 | "cordova-plugin-device": {}, 50 | "cordova-plugin-splashscreen": {}, 51 | "cordova-plugin-statusbar": {}, 52 | "cordova-plugin-whitelist": {}, 53 | "ionic-plugin-keyboard": {} 54 | }, 55 | "platforms": [ 56 | "android", 57 | "ios" 58 | ] 59 | } 60 | } -------------------------------------------------------------------------------- /resources/android/icon/drawable-hdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-hdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-ldpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-ldpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-mdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-mdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-xhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-xxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/icon/drawable-xxxhdpi-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/icon/drawable-xxxhdpi-icon.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-land-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-land-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-hdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-hdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-ldpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-ldpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-mdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-mdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-xhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-xxhdpi-screen.png -------------------------------------------------------------------------------- /resources/android/splash/drawable-port-xxxhdpi-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/android/splash/drawable-port-xxxhdpi-screen.png -------------------------------------------------------------------------------- /resources/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/icon.png -------------------------------------------------------------------------------- /resources/icon.png.md5: -------------------------------------------------------------------------------- 1 | 3f1bbdf1aefcb5ce7b60770ce907c68f -------------------------------------------------------------------------------- /resources/ios/icon/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-1024.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-40.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-40@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-40@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-50.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-50@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-60.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-60@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-60@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-72.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-72@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-76.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-76@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-83.5@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-small.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-small@2x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon-small@3x.png -------------------------------------------------------------------------------- /resources/ios/icon/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon.png -------------------------------------------------------------------------------- /resources/ios/icon/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/icon/icon@2x.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-667h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Landscape-736h.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Landscape@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait@~ipadpro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Portrait@~ipadpro.png -------------------------------------------------------------------------------- /resources/ios/splash/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default@2x~iphone.png -------------------------------------------------------------------------------- /resources/ios/splash/Default@2x~universal~anyany.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default@2x~universal~anyany.png -------------------------------------------------------------------------------- /resources/ios/splash/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/ios/splash/Default~iphone.png -------------------------------------------------------------------------------- /resources/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/resources/splash.png -------------------------------------------------------------------------------- /resources/splash.png.md5: -------------------------------------------------------------------------------- 1 | 0dcf1df8c92c1ece4382d3357d9f8562 -------------------------------------------------------------------------------- /src/app/app.component.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | import { Component } from '@angular/core'; 11 | import { Platform } from 'ionic-angular'; 12 | import { StatusBar } from '@ionic-native/status-bar'; 13 | import { SplashScreen } from '@ionic-native/splash-screen'; 14 | import { ManyTabsPage } from '../pages/many-tabs/many-tabs'; 15 | var MyApp = /** @class */ (function () { 16 | function MyApp(platform, statusBar, splashScreen) { 17 | this.rootPage = ManyTabsPage; 18 | platform.ready().then(function () { 19 | if (platform.is('cordova')) { 20 | statusBar.styleDefault(); 21 | splashScreen.hide(); 22 | } 23 | }); 24 | } 25 | MyApp = __decorate([ 26 | Component({ 27 | templateUrl: 'app.html' 28 | }), 29 | __metadata("design:paramtypes", [Platform, StatusBar, SplashScreen]) 30 | ], MyApp); 31 | return MyApp; 32 | }()); 33 | export { MyApp }; 34 | //# sourceMappingURL=app.component.js.map -------------------------------------------------------------------------------- /src/app/app.component.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.component.js","sourceRoot":"","sources":["app.component.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAM5D;IAGE,eAAY,QAAkB,EAAE,SAAoB,EAAE,YAA0B;QAFhF,aAAQ,GAAO,YAAY,CAAC;QAG1B,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC;YACpB,EAAE,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAC3B,SAAS,CAAC,YAAY,EAAE,CAAC;gBACzB,YAAY,CAAC,IAAI,EAAE,CAAC;YACtB,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;IAVU,KAAK;QAHjB,SAAS,CAAC;YACT,WAAW,EAAE,UAAU;SACxB,CAAC;yCAIsB,QAAQ,EAAa,SAAS,EAAgB,YAAY;OAHrE,KAAK,CAWjB;IAAD,YAAC;CAAA,AAXD,IAWC;SAXY,KAAK"} -------------------------------------------------------------------------------- /src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { Platform } from 'ionic-angular'; 3 | import { StatusBar } from '@ionic-native/status-bar'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | 6 | import { ManyTabsPage } from '../pages/many-tabs/many-tabs'; 7 | import { HomePage } from '../pages/home/home'; 8 | import { GoogleplayTabsPage } from '../pages/googleplay-tabs/googleplay-tabs'; 9 | 10 | @Component({ 11 | templateUrl: 'app.html' 12 | }) 13 | export class MyApp { 14 | rootPage:any = GoogleplayTabsPage; 15 | 16 | constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen) { 17 | platform.ready().then(() => { 18 | if (platform.is('cordova')) { 19 | statusBar.styleDefault(); 20 | splashScreen.hide(); 21 | } 22 | }); 23 | } 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/app/app.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/app/app.module.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | import { BrowserModule } from '@angular/platform-browser'; 8 | import { ErrorHandler, NgModule } from '@angular/core'; 9 | import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; 10 | import { SplashScreen } from '@ionic-native/splash-screen'; 11 | import { StatusBar } from '@ionic-native/status-bar'; 12 | import { MyApp } from './app.component'; 13 | import { HomePage } from '../pages/home/home'; 14 | import { ManyTabsPage } from '../pages/many-tabs/many-tabs'; 15 | var AppModule = /** @class */ (function () { 16 | function AppModule() { 17 | } 18 | AppModule = __decorate([ 19 | NgModule({ 20 | declarations: [ 21 | MyApp, 22 | HomePage, 23 | ManyTabsPage 24 | ], 25 | imports: [ 26 | BrowserModule, 27 | IonicModule.forRoot(MyApp) 28 | ], 29 | bootstrap: [IonicApp], 30 | entryComponents: [ 31 | MyApp, 32 | HomePage, 33 | ManyTabsPage 34 | ], 35 | providers: [ 36 | StatusBar, 37 | SplashScreen, 38 | { provide: ErrorHandler, useClass: IonicErrorHandler } 39 | ] 40 | }) 41 | ], AppModule); 42 | return AppModule; 43 | }()); 44 | export { AppModule }; 45 | //# sourceMappingURL=app.module.js.map -------------------------------------------------------------------------------- /src/app/app.module.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"app.module.js","sourceRoot":"","sources":["app.module.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAErD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAwB5D;IAAA;IAAwB,CAAC;IAAZ,SAAS;QAtBrB,QAAQ,CAAC;YACR,YAAY,EAAE;gBACZ,KAAK;gBACL,QAAQ;gBACR,YAAY;aACb;YACD,OAAO,EAAE;gBACP,aAAa;gBACb,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC;aAC3B;YACD,SAAS,EAAE,CAAC,QAAQ,CAAC;YACrB,eAAe,EAAE;gBACf,KAAK;gBACL,QAAQ;gBACR,YAAY;aACb;YACD,SAAS,EAAE;gBACT,SAAS;gBACT,YAAY;gBACZ,EAAC,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAC;aACrD;SACF,CAAC;OACW,SAAS,CAAG;IAAD,gBAAC;CAAA,AAAzB,IAAyB;SAAZ,SAAS"} -------------------------------------------------------------------------------- /src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { BrowserModule } from '@angular/platform-browser'; 2 | import { ErrorHandler, NgModule } from '@angular/core'; 3 | import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular'; 4 | import { SplashScreen } from '@ionic-native/splash-screen'; 5 | import { StatusBar } from '@ionic-native/status-bar'; 6 | 7 | import { MyApp } from './app.component'; 8 | import { HomePage } from '../pages/home/home'; 9 | import { ManyTabsPage } from '../pages/many-tabs/many-tabs'; 10 | import { GoogleplayTabsPage } from '../pages/googleplay-tabs/googleplay-tabs'; 11 | 12 | @NgModule({ 13 | declarations: [ 14 | MyApp, 15 | HomePage, 16 | ManyTabsPage, 17 | GoogleplayTabsPage 18 | ], 19 | imports: [ 20 | BrowserModule, 21 | IonicModule.forRoot(MyApp) 22 | ], 23 | bootstrap: [IonicApp], 24 | entryComponents: [ 25 | MyApp, 26 | HomePage, 27 | ManyTabsPage, 28 | GoogleplayTabsPage 29 | ], 30 | providers: [ 31 | StatusBar, 32 | SplashScreen, 33 | {provide: ErrorHandler, useClass: IonicErrorHandler} 34 | ] 35 | }) 36 | export class AppModule {} 37 | -------------------------------------------------------------------------------- /src/app/app.scss: -------------------------------------------------------------------------------- 1 | // http://ionicframework.com/docs/theming/ 2 | 3 | 4 | // App Global Sass 5 | // -------------------------------------------------- 6 | // Put style rules here that you want to apply globally. These 7 | // styles are for the entire app and not just one component. 8 | // Additionally, this file can be also used as an entry point 9 | // to import other Sass files to be included in the output CSS. 10 | // 11 | // Shared Sass variables, which can be used to adjust Ionic's 12 | // default Sass variables, belong in "theme/variables.scss". 13 | // 14 | // To declare rules for a specific mode, create a child rule 15 | // for the .md, .ios, or .wp mode classes. The mode class is 16 | // automatically applied to the element in the app. 17 | -------------------------------------------------------------------------------- /src/app/main.js: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | import { AppModule } from './app.module'; 3 | platformBrowserDynamic().bootstrapModule(AppModule); 4 | //# sourceMappingURL=main.js.map -------------------------------------------------------------------------------- /src/app/main.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"main.js","sourceRoot":"","sources":["main.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAE3E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,sBAAsB,EAAE,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC"} -------------------------------------------------------------------------------- /src/app/main.ts: -------------------------------------------------------------------------------- 1 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 2 | 3 | import { AppModule } from './app.module'; 4 | 5 | platformBrowserDynamic().bootstrapModule(AppModule); 6 | -------------------------------------------------------------------------------- /src/assets/icon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/newsof1111/swipedTabs-ionic3/ce1abc2d5a613338c8fb957c919059614a84a580/src/assets/icon/favicon.ico -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Ionic App 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /src/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ionic", 3 | "short_name": "Ionic", 4 | "start_url": "index.html", 5 | "display": "standalone", 6 | "icons": [{ 7 | "src": "assets/imgs/logo.png", 8 | "sizes": "512x512", 9 | "type": "image/png" 10 | }], 11 | "background_color": "#4e8ef7", 12 | "theme_color": "#4e8ef7" 13 | } -------------------------------------------------------------------------------- /src/pages/googleplay-tabs/googleplay-tabs.html: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | googleplayTabs 11 | 12 | 13 | 14 | 15 | 17 | {{tab}} 18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 |
26 | 27 | 28 | 29 | 34 | 35 |

Page 0

36 |
37 | 38 |

Page 1

39 |
40 | 41 |

Page 2

42 |
43 | 44 |

Page 3

45 |
46 | 47 |

Page 4

48 |
49 | 50 |

Page 5

51 |
52 | 53 |

Page 6

54 |
55 | 56 |

Page 7

57 |
58 | 59 |

Page 8

60 |
61 | 62 |

Page 9

63 |
64 | 65 | 66 | 67 |

page For tutorual

68 |
69 | 70 |
71 |
72 | -------------------------------------------------------------------------------- /src/pages/googleplay-tabs/googleplay-tabs.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { IonicPageModule } from 'ionic-angular'; 3 | import { GoogleplayTabsPage } from './googleplay-tabs'; 4 | 5 | @NgModule({ 6 | declarations: [ 7 | GoogleplayTabsPage, 8 | ], 9 | imports: [ 10 | IonicPageModule.forChild(GoogleplayTabsPage), 11 | ], 12 | }) 13 | export class GoogleplayTabsPageModule {} 14 | -------------------------------------------------------------------------------- /src/pages/googleplay-tabs/googleplay-tabs.scss: -------------------------------------------------------------------------------- 1 | page-googleplay-tabs { 2 | .SwipedTabs-indicatorSegment 3 | { 4 | -webkit-transition: 0.2s all; 5 | -moz-transition: 0.2s all; 6 | -o-transition: 0.2s all; 7 | transition: 0.2s all; 8 | transform-origin: top 0 left 0; 9 | height: 1px; 10 | position: relative; 11 | top: -2px; 12 | background-color: blue !important; 13 | } 14 | 15 | .SwipedTabs-tabs ion-segment-button 16 | { 17 | border:none !important; 18 | color:green!important; 19 | background-color:white!important; 20 | padding-left: 20px !important; 21 | padding-right: 20px !important; 22 | } 23 | 24 | .SwipedTabs-tabs ion-segment-button.SwipedTabs-activeTab 25 | { 26 | color:blue !important; 27 | } 28 | 29 | .SwipedTabs-tabs 30 | { 31 | width: fit-content !important; 32 | } 33 | 34 | .toolbar * 35 | { 36 | margin: 0 !important; 37 | } 38 | 39 | .tabsContent .scroll-content 40 | { 41 | overflow-x: scroll !important; 42 | } 43 | 44 | .tabsContent 45 | { 46 | height: 50px !important; 47 | } 48 | 49 | .segment-button 50 | { 51 | max-width: initial !important; 52 | flex: auto !important; 53 | width: initial !important; 54 | } 55 | } 56 | 57 | .ios{ 58 | page-googleplay-tabs { 59 | .SwipedTabs-indicatorSegment 60 | { 61 | position: relative; 62 | top: 44px !important; 63 | } 64 | 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/pages/googleplay-tabs/googleplay-tabs.ts: -------------------------------------------------------------------------------- 1 | import { Component ,ViewChild} from '@angular/core'; 2 | import { IonicPage, NavController, NavParams , Slides , Content,Platform} from 'ionic-angular'; 3 | 4 | /** 5 | * Generated class for the GoogleplayTabsPage page. 6 | * 7 | * See https://ionicframework.com/docs/components/#navigation for more info on 8 | * Ionic pages and navigation. 9 | */ 10 | 11 | @IonicPage() 12 | @Component({ 13 | selector: 'page-googleplay-tabs', 14 | templateUrl: 'googleplay-tabs.html', 15 | }) 16 | 17 | 18 | export class GoogleplayTabsPage { 19 | 20 | @ViewChild('SwipedTabsSlider') SwipedTabsSlider: Slides ; 21 | @ViewChild('MultiItemsScrollingTabs') ItemsTitles : Content; 22 | 23 | SwipedTabsIndicator :any= null; 24 | tabTitleWidthArray :any= []; 25 | tabElementWidth_px :number= 50; 26 | screenWidth_px :number= 0; 27 | isRight :boolean= true; 28 | isLeft:boolean= true; 29 | tabs:any=[]; 30 | 31 | 32 | constructor(public navCtrl: NavController ,platform: Platform) { 33 | this.tabs=["page0","1","page2","3","page4","5","page6","7","page8","9","page For tutorual"]; 34 | console.log('Width: ' + platform.width()); 35 | this.screenWidth_px=platform.width(); 36 | 37 | } 38 | ionViewDidEnter() { 39 | this.SwipedTabsIndicator = document.getElementById("indicator"); 40 | for (let i in this.tabs) 41 | this.tabTitleWidthArray.push(document.getElementById("tabTitle"+i).offsetWidth); 42 | 43 | this.selectTab(0); 44 | } 45 | 46 | scrollIndicatiorTab() 47 | { 48 | this.ItemsTitles.scrollTo(this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex())-this.screenWidth_px/2,0); 49 | } 50 | 51 | selectTab(index) 52 | { 53 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[index]+"px"; 54 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(this.calculateDistanceToSpnd(index))+'px,0,0)'; 55 | this.SwipedTabsSlider.slideTo(index); 56 | } 57 | 58 | calculateDistanceToSpnd(index) 59 | { 60 | var result=0; 61 | for (var _i = 0; _i < index; _i++) { 62 | result=result+this.tabTitleWidthArray[_i]; 63 | } 64 | return result; 65 | } 66 | 67 | updateIndicatorPosition() { 68 | var index=this.SwipedTabsSlider.getActiveIndex(); 69 | if( this.SwipedTabsSlider.length()==index) 70 | index=index-1; 71 | 72 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[index]+"px"; 73 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(this.calculateDistanceToSpnd(index))+'px,0,0)'; 74 | 75 | } 76 | 77 | updateIndicatorPositionOnTouchEnd() 78 | { 79 | setTimeout( () => { this.updateIndicatorPosition(); }, 200); 80 | } 81 | 82 | animateIndicator($event) 83 | { 84 | 85 | this.isLeft=false; 86 | this.isRight=false; 87 | var currentSliderCenterProgress =(1/(this.SwipedTabsSlider.length()-1) )*this.SwipedTabsSlider.getActiveIndex(); 88 | if($event.progress < currentSliderCenterProgress) 89 | { 90 | this.isLeft=true; 91 | this.isRight=false; 92 | 93 | } if($event.progress > currentSliderCenterProgress) 94 | { 95 | this.isLeft=false; 96 | this.isRight=true; 97 | } 98 | 99 | if(this.SwipedTabsSlider.isEnd()) 100 | this.isRight=false; 101 | 102 | if( this.SwipedTabsSlider.isBeginning()) 103 | this.isLeft=false; 104 | 105 | if(this.isRight) 106 | this.SwipedTabsIndicator.style.webkitTransform = 107 | 'translate3d('+( this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex()) 108 | +($event.progress - currentSliderCenterProgress) *(this.SwipedTabsSlider.length()-1)*this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex()+1]) 109 | +'px,0,0)'; 110 | 111 | if(this.isLeft) 112 | this.SwipedTabsIndicator.style.webkitTransform = 113 | 'translate3d('+( this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex()) 114 | +($event.progress - currentSliderCenterProgress) *(this.SwipedTabsSlider.length()-1)*this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex()-1]) 115 | +'px,0,0)'; 116 | 117 | if(!this.isRight && !this.isLeft) 118 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex()]+"px"; 119 | 120 | } 121 | 122 | 123 | 124 | } 125 | 126 | -------------------------------------------------------------------------------- /src/pages/home/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | SwipedTabs 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 14 | {{tab}} 15 | 16 | 17 | 18 | 19 |
20 | 21 | 27 | 28 |

Page 1

29 |
30 | 31 |

Page 2

32 |
33 | 34 |

Page 3

35 |
36 | 37 |

Page 4

38 |
39 |
40 | 41 | 42 |
43 | -------------------------------------------------------------------------------- /src/pages/home/home.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | import { Component, ViewChild } from '@angular/core'; 11 | import { NavController, Slides } from 'ionic-angular'; 12 | var HomePage = /** @class */ (function () { 13 | function HomePage(navCtrl) { 14 | this.navCtrl = navCtrl; 15 | this.SwipedTabsIndicator = null; 16 | this.tabs = []; 17 | this.tabs = ["page1", "page2", "page3", "page4"]; 18 | } 19 | HomePage.prototype.ionViewDidEnter = function () { 20 | this.SwipedTabsIndicator = document.getElementById("indicator"); 21 | }; 22 | HomePage.prototype.selectTab = function (index) { 23 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (100 * index) + '%,0,0)'; 24 | this.SwipedTabsSlider.slideTo(index, 500); 25 | }; 26 | HomePage.prototype.updateIndicatorPosition = function () { 27 | // this condition is to avoid passing to incorrect index 28 | if (this.SwipedTabsSlider.length() > this.SwipedTabsSlider.getActiveIndex()) { 29 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (this.SwipedTabsSlider.getActiveIndex() * 100) + '%,0,0)'; 30 | } 31 | }; 32 | HomePage.prototype.animateIndicator = function ($event) { 33 | if (this.SwipedTabsIndicator) 34 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (($event.progress * (this.SwipedTabsSlider.length() - 1)) * 100) + '%,0,0)'; 35 | }; 36 | __decorate([ 37 | ViewChild('SwipedTabsSlider'), 38 | __metadata("design:type", Slides) 39 | ], HomePage.prototype, "SwipedTabsSlider", void 0); 40 | HomePage = __decorate([ 41 | Component({ 42 | selector: 'page-home', 43 | templateUrl: 'home.html' 44 | }), 45 | __metadata("design:paramtypes", [NavController]) 46 | ], HomePage); 47 | return HomePage; 48 | }()); 49 | export { HomePage }; 50 | //# sourceMappingURL=home.js.map -------------------------------------------------------------------------------- /src/pages/home/home.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"home.js","sourceRoot":"","sources":["home.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAC,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AAMrD;IAOE,kBAAmB,OAAsB;QAAtB,YAAO,GAAP,OAAO,CAAe;QAJzC,wBAAmB,GAAO,IAAI,CAAC;QAC/B,SAAI,GAAK,EAAE,CAAC;QAIX,IAAI,CAAC,IAAI,GAAC,CAAC,OAAO,EAAC,OAAO,EAAC,OAAO,EAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACD,kCAAe,GAAf;QACE,IAAI,CAAC,mBAAmB,GAAG,QAAQ,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;IAClE,CAAC;IAED,4BAAS,GAAT,UAAU,KAAK;QACb,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,eAAe,GAAG,cAAc,GAAC,CAAC,GAAG,GAAC,KAAK,CAAC,GAAC,QAAQ,CAAC;QACrF,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,0CAAuB,GAAvB;QACI,wDAAwD;QAC3D,EAAE,CAAA,CAAE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAE,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,CAAC,CAC3E,CAAC;YACA,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,eAAe,GAAG,cAAc,GAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,cAAc,EAAE,GAAG,GAAG,CAAC,GAAC,QAAQ,CAAC;QACzH,CAAC;IAEA,CAAC;IAEH,mCAAgB,GAAhB,UAAiB,MAAM;QACtB,EAAE,CAAA,CAAC,IAAI,CAAC,mBAAmB,CAAC;YACvB,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,eAAe,GAAG,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,GAAE,CAAC,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAC,CAAC,CAAC,CAAC,GAAC,GAAG,CAAC,GAAG,QAAQ,CAAC;IAC/I,CAAC;IA9B6B;QAA9B,SAAS,CAAC,kBAAkB,CAAC;kCAAmB,MAAM;sDAAE;IAD7C,QAAQ;QAJpB,SAAS,CAAC;YACT,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,WAAW;SACzB,CAAC;yCAQ4B,aAAa;OAP9B,QAAQ,CAmCpB;IAAD,eAAC;CAAA,AAnCD,IAmCC;SAnCY,QAAQ"} -------------------------------------------------------------------------------- /src/pages/home/home.scss: -------------------------------------------------------------------------------- 1 | page-home 2 | { 3 | .SwipedTabs-indicatorSegment 4 | { 5 | -webkit-transition: 0.3s all; 6 | -moz-transition: 0.3s all; 7 | -o-transition: 0.3s all; 8 | transition: 0.3s all; 9 | transform-origin: top 0 left 0; 10 | height: 1px; 11 | position: relative; 12 | top: -2px; 13 | background-color: black !important; 14 | } 15 | .SwipedTabs-tabs ion-segment-button 16 | { 17 | border:none !important; 18 | color:gray!important; 19 | background-color:white!important; 20 | } 21 | .SwipedTabs-tabs ion-segment-button.SwipedTabs-activeTab 22 | { 23 | color:black !important; 24 | } 25 | .SwipedTabs-tabs 26 | { 27 | border-bottom: solid 1px #e6e6e6 !important; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/pages/home/home.ts: -------------------------------------------------------------------------------- 1 | import { Component ,ViewChild} from '@angular/core'; 2 | import { NavController ,Slides} from 'ionic-angular'; 3 | 4 | @Component({ 5 | selector: 'page-home', 6 | templateUrl: 'home.html' 7 | }) 8 | export class HomePage { 9 | @ViewChild('SwipedTabsSlider') SwipedTabsSlider: Slides ; 10 | 11 | SwipedTabsIndicator :any= null; 12 | tabs:any=[]; 13 | 14 | 15 | constructor(public navCtrl: NavController) { 16 | this.tabs=["page1","page2","page3","page4"]; 17 | } 18 | ionViewDidEnter() { 19 | this.SwipedTabsIndicator = document.getElementById("indicator"); 20 | } 21 | 22 | selectTab(index) { 23 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(100*index)+'%,0,0)'; 24 | this.SwipedTabsSlider.slideTo(index, 500); 25 | } 26 | 27 | updateIndicatorPosition() { 28 | // this condition is to avoid passing to incorrect index 29 | if( this.SwipedTabsSlider.length()> this.SwipedTabsSlider.getActiveIndex()) 30 | { 31 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(this.SwipedTabsSlider.getActiveIndex() * 100)+'%,0,0)'; 32 | } 33 | 34 | } 35 | 36 | animateIndicator($event) { 37 | if(this.SwipedTabsIndicator) 38 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (($event.progress* (this.SwipedTabsSlider.length()-1))*100) + '%,0,0)'; 39 | } 40 | 41 | 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/pages/many-tabs/many-tabs.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Empty 6 | 7 | 8 | 9 | 11 | {{tab}} 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 29 | 30 |

Page 1

31 |
32 | 33 |

Page 2

34 |
35 | 36 |

Page 3

37 |
38 | 39 |

Page 4

40 |
41 | 42 |

Page 5

43 |
44 | 45 |

Page 6

46 |
47 | 48 |

Page 7

49 |
50 | 51 |

Page 8

52 |
53 | 54 |

Page 9

55 |
56 | 57 |

Page 10

58 |
59 | 60 |

Page 11

61 |
62 | 63 |

Page 12

64 |
65 |
66 | 67 | 68 |
69 | -------------------------------------------------------------------------------- /src/pages/many-tabs/many-tabs.js: -------------------------------------------------------------------------------- 1 | var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { 2 | var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; 3 | if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 4 | else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; 5 | return c > 3 && r && Object.defineProperty(target, key, r), r; 6 | }; 7 | var __metadata = (this && this.__metadata) || function (k, v) { 8 | if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); 9 | }; 10 | import { Component, ViewChild } from '@angular/core'; 11 | import { NavController, Slides, Content } from 'ionic-angular'; 12 | var ManyTabsPage = /** @class */ (function () { 13 | function ManyTabsPage(navCtrl) { 14 | this.navCtrl = navCtrl; 15 | this.SwipedTabsIndicator = null; 16 | this.tabTitleWidthArray = []; 17 | this.tabElementWidth_px = 50; 18 | this.isRight = true; 19 | this.tabs = []; 20 | this.previousDrag = 0; 21 | this.tabs = ["p1csdfdsfdsfsdsddf", "p2", "pqsdqsd3", "p4", "pqsdqsdqssq5", "p6", "p7qsdqsdqsd", "p8", "p9", "p10qsdds", "p11qsdds", "p12ds"]; 22 | } 23 | ManyTabsPage.prototype.ionViewDidEnter = function () { 24 | this.SwipedTabsIndicator = document.getElementById("indicator"); 25 | for (var i in this.tabs) { 26 | this.tabTitleWidthArray.push(document.getElementById("tabTitle" + i).offsetWidth); 27 | } 28 | // console.log(this.tabTitleWidthArray); 29 | }; 30 | ManyTabsPage.prototype.selectTab = function (index) { 31 | // console.log(document.getElementById("tabTitle1").offsetWidth); 32 | //console.log($event.target.offsetWidth); 33 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[index] + "px"; 34 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (this.calculateDistanceToSpnd(index)) + 'px,0,0)'; 35 | //this.scroll.scrollTo(this.calculateDistanceToSpnd(index),0); 36 | this.SwipedTabsSlider.slideTo(index); 37 | }; 38 | ManyTabsPage.prototype.calculateDistanceToSpnd = function (index) { 39 | var result = 0; 40 | for (var _i = 0; _i < index; _i++) { 41 | // console.log(_i); 42 | result = result + this.tabTitleWidthArray[_i]; 43 | } 44 | //console.log(result); 45 | return result; 46 | }; 47 | ManyTabsPage.prototype.updateIndicatorPosition = function () { 48 | var index = this.SwipedTabsSlider.getActiveIndex(); 49 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[index] + "px"; 50 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (this.calculateDistanceToSpnd(index)) + 'px,0,0)'; 51 | this.scroll.scrollTo(this.calculateDistanceToSpnd(index), 0); 52 | /* 53 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex()]+"px"; 54 | 55 | 56 | // this condition is to avoid passing to incorrect index 57 | if( this.SwipedTabsSlider.length()< this.SwipedTabsSlider.getActiveIndex()) 58 | { 59 | 60 | this.scroll.scrollTo(this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex()),0,500); 61 | 62 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex()))+'px,0,0)'; 63 | } 64 | 65 | */ 66 | }; 67 | ManyTabsPage.prototype.animateIndicator = function ($event) { 68 | if ($event.progress > 0 && $event.progress < 1) { 69 | if ($event.progress > this.previousDrag) { 70 | this.isRight = true; 71 | } 72 | if ($event.progress < this.previousDrag) { 73 | this.isRight = false; 74 | } 75 | // console.log('$event.progres: '+$event.progress); 76 | // console.log('previousDrag: '+this.previousDrag); 77 | if (this.isRight) { 78 | if (this.SwipedTabsSlider.length() > this.SwipedTabsSlider.getActiveIndex()) { 79 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex() + 1] + "px"; 80 | console.log('right'); 81 | } 82 | } 83 | else { 84 | this.SwipedTabsIndicator.style.width = this.tabTitleWidthArray[this.SwipedTabsSlider.getActiveIndex() - 1] + "px"; 85 | console.log('left'); 86 | } 87 | if (this.SwipedTabsIndicator) 88 | // console.log("progress: "+$event.progress *100); 89 | // 90 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (($event.progress * (this.calculateDistanceToSpnd(this.SwipedTabsSlider.length() - 1)))) + 'px,0,0)'; 91 | this.previousDrag = $event.progress; 92 | } 93 | else { 94 | if () 95 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (this.calculateDistanceToSpnd(this.SwipedTabsSlider.getActiveIndex())) + 'px,0,0)'; 96 | } 97 | }; 98 | __decorate([ 99 | ViewChild('SwipedTabsSlider'), 100 | __metadata("design:type", Slides) 101 | ], ManyTabsPage.prototype, "SwipedTabsSlider", void 0); 102 | __decorate([ 103 | ViewChild('scroll'), 104 | __metadata("design:type", Content) 105 | ], ManyTabsPage.prototype, "scroll", void 0); 106 | ManyTabsPage = __decorate([ 107 | Component({ 108 | selector: 'page-many-tabs', 109 | templateUrl: 'many-tabs.html', 110 | }), 111 | __metadata("design:paramtypes", [NavController]) 112 | ], ManyTabsPage); 113 | return ManyTabsPage; 114 | }()); 115 | export { ManyTabsPage }; 116 | //# sourceMappingURL=many-tabs.js.map -------------------------------------------------------------------------------- /src/pages/many-tabs/many-tabs.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"many-tabs.js","sourceRoot":"","sources":["many-tabs.ts"],"names":[],"mappings":"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"} -------------------------------------------------------------------------------- /src/pages/many-tabs/many-tabs.scss: -------------------------------------------------------------------------------- 1 | page-many-tabs { 2 | 3 | .SwipedTabs-indicatorSegment 4 | { 5 | -webkit-transition: 0.3s all; 6 | -moz-transition: 0.3s all; 7 | -o-transition: 0.3s all; 8 | transition: 0.3s all; 9 | transform-origin: top 0 left 0; 10 | height: 1px; 11 | position: relative; 12 | top: -2px; 13 | background-color: blue !important; 14 | 15 | 16 | } 17 | .SwipedTabs-tabs ion-segment-button 18 | { 19 | border:none !important; 20 | color:green!important; 21 | background-color:white!important; 22 | 23 | } 24 | .SwipedTabs-tabs ion-segment-button.SwipedTabs-activeTab 25 | { 26 | color:blue !important; 27 | } 28 | .SwipedTabs-tabs 29 | { 30 | width: fit-content !important; 31 | border-bottom: solid 1px #e6e6e6 !important; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/pages/many-tabs/many-tabs.ts: -------------------------------------------------------------------------------- 1 | import { Component ,ViewChild} from '@angular/core'; 2 | import { IonicPage, NavController , Slides , Content} from 'ionic-angular'; 3 | 4 | 5 | 6 | @Component({ 7 | selector: 'page-many-tabs', 8 | templateUrl: 'many-tabs.html', 9 | }) 10 | export class ManyTabsPage { 11 | 12 | @ViewChild('SwipedTabsSlider') SwipedTabsSlider: Slides ; 13 | @ViewChild('scroll') scroll: Content; 14 | 15 | SwipedTabsIndicator :any= null; 16 | tabElementWidth_px :number= 50; 17 | tabs:any=[]; 18 | 19 | 20 | constructor(public navCtrl: NavController) { 21 | this.tabs=["p1","p2","p3","p4","p5","p6","p7","p8","p9","p10","p11","p12"]; 22 | } 23 | ionViewDidEnter() { 24 | this.SwipedTabsIndicator = document.getElementById("indicator"); 25 | } 26 | 27 | selectTab(index) { 28 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(100*index)+'%,0,0)'; 29 | this.scroll.scrollTo(index*this.tabElementWidth_px,0,500); 30 | this.SwipedTabsSlider.slideTo(index, 500); 31 | } 32 | 33 | updateIndicatorPosition() { 34 | this.scroll.scrollTo(this.SwipedTabsSlider.getActiveIndex()*this.tabElementWidth_px,0,200); 35 | 36 | // this condition is to avoid passing to incorrect index 37 | if( this.SwipedTabsSlider.length()> this.SwipedTabsSlider.getActiveIndex()) 38 | { 39 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d('+(this.SwipedTabsSlider.getActiveIndex() * 100)+'%,0,0)'; 40 | } 41 | 42 | } 43 | 44 | 45 | animateIndicator($event) { 46 | if(this.SwipedTabsIndicator) 47 | this.SwipedTabsIndicator.style.webkitTransform = 'translate3d(' + (($event.progress* (this.SwipedTabsSlider.length()-1))*100) + '%,0,0)'; 48 | 49 | } 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Check out https://googlechrome.github.io/sw-toolbox/ for 3 | * more info on how to use sw-toolbox to custom configure your service worker. 4 | */ 5 | 6 | 7 | 'use strict'; 8 | importScripts('./build/sw-toolbox.js'); 9 | 10 | self.toolbox.options.cache = { 11 | name: 'ionic-cache' 12 | }; 13 | 14 | // pre-cache our key assets 15 | self.toolbox.precache( 16 | [ 17 | './build/main.js', 18 | './build/vendor.js', 19 | './build/main.css', 20 | './build/polyfills.js', 21 | 'index.html', 22 | 'manifest.json' 23 | ] 24 | ); 25 | 26 | // dynamically cache any other local assets 27 | self.toolbox.router.any('/*', self.toolbox.cacheFirst); 28 | 29 | // for any other requests go to the network, cache, 30 | // and then only use that cached resource if your user goes offline 31 | self.toolbox.router.default = self.toolbox.networkFirst; 32 | -------------------------------------------------------------------------------- /src/theme/variables.scss: -------------------------------------------------------------------------------- 1 | // Ionic Variables and Theming. For more info, please see: 2 | // http://ionicframework.com/docs/theming/ 3 | 4 | // Font path is used to include ionicons, 5 | // roboto, and noto sans fonts 6 | $font-path: "../assets/fonts"; 7 | 8 | 9 | // The app direction is used to include 10 | // rtl styles in your app. For more info, please see: 11 | // http://ionicframework.com/docs/theming/rtl-support/ 12 | $app-direction: ltr; 13 | 14 | 15 | @import "ionic.globals"; 16 | 17 | 18 | // Shared Variables 19 | // -------------------------------------------------- 20 | // To customize the look and feel of this app, you can override 21 | // the Sass variables found in Ionic's source scss files. 22 | // To view all the possible Ionic variables, see: 23 | // http://ionicframework.com/docs/theming/overriding-ionic-variables/ 24 | 25 | 26 | 27 | 28 | // Named Color Variables 29 | // -------------------------------------------------- 30 | // Named colors makes it easy to reuse colors on various components. 31 | // It's highly recommended to change the default colors 32 | // to match your app's branding. Ionic uses a Sass map of 33 | // colors so you can add, rename and remove colors as needed. 34 | // The "primary" color is the only required color in the map. 35 | 36 | $colors: ( 37 | primary: #488aff, 38 | secondary: #32db64, 39 | danger: #f53d3d, 40 | light: #f4f4f4, 41 | dark: #222 42 | ); 43 | 44 | 45 | // App iOS Variables 46 | // -------------------------------------------------- 47 | // iOS only Sass variables can go here 48 | 49 | 50 | 51 | 52 | // App Material Design Variables 53 | // -------------------------------------------------- 54 | // Material Design only Sass variables can go here 55 | 56 | 57 | 58 | 59 | // App Windows Variables 60 | // -------------------------------------------------- 61 | // Windows only Sass variables can go here 62 | 63 | 64 | 65 | 66 | // App Theme 67 | // -------------------------------------------------- 68 | // Ionic apps can have different themes applied, which can 69 | // then be future customized. This import comes last 70 | // so that the above variables are used and Ionic's 71 | // default are overridden. 72 | 73 | @import "ionic.theme.default"; 74 | 75 | 76 | // Ionicons 77 | // -------------------------------------------------- 78 | // The premium icon font for Ionic. For more info, please see: 79 | // http://ionicframework.com/docs/ionicons/ 80 | 81 | @import "ionic.ionicons"; 82 | 83 | 84 | // Fonts 85 | // -------------------------------------------------- 86 | 87 | @import "roboto"; 88 | @import "noto-sans"; 89 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true, 4 | "declaration": false, 5 | "emitDecoratorMetadata": true, 6 | "experimentalDecorators": true, 7 | "lib": [ 8 | "dom", 9 | "es2015" 10 | ], 11 | "module": "es2015", 12 | "moduleResolution": "node", 13 | "sourceMap": true, 14 | "target": "es5" 15 | }, 16 | "include": [ 17 | "src/**/*.ts" 18 | ], 19 | "exclude": [ 20 | "node_modules" 21 | ], 22 | "compileOnSave": false, 23 | "atom": { 24 | "rewriteTsconfig": false 25 | } 26 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "no-duplicate-variable": true, 4 | "no-unused-variable": [ 5 | true 6 | ] 7 | }, 8 | "rulesDirectory": [ 9 | "node_modules/tslint-eslint-rules/dist/rules" 10 | ] 11 | } 12 | --------------------------------------------------------------------------------