diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 6e29631db..000000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,7 +0,0 @@ -PSST! Want to get faster responses to bug reports and important issues? Help us keep the issue tracker organized by: - -- Reporting bugs. Please include all details about the problem and provide a sample app (consider using the [playground](https://play.nativescript.org) for this. -- Proposing features and enhancements. -- Discussing implementation details. - -Please move all other content to the [forums](https://discourse.nativescript.org/). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..70c9beb9d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,31 @@ +--- +name: Bug report +about: 'We really appreciate your effort to provide feedback. Before opening a new + issue, please make sure that this case is not already reported in GitHub as an + issue or in StackOverflow as a question.' + +--- + +**Environment** +Provide version numbers for the following components (information can be retrieved by running `tns info` in your project folder or by inspecting the `package.json` of the project): + - CLI: + - Cross-platform modules: + - Android Runtime: + - iOS Runtime: + - Plugin(s): + - NativeScript-Angular: + - Angular: + +**Describe the bug** + + +**To Reproduce** + + +**Expected behavior** + +**Sample project** + + +**Additional context** + diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 000000000..397090987 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,17 @@ +--- +name: Feature request +about: Suggest an idea for this project + +--- + +**Is your feature request related to a problem? Please describe.** + + +**Describe the solution you'd like** + + +**Describe alternatives you've considered** + + +**Additional context** + diff --git a/.gitignore b/.gitignore index 7b21aa525..ca4ea8626 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,11 @@ -bin/dist node_modules +platforms +hooks tags +dist **/*.js.map **/*.metadata.json -/hooks - /nativescript-angular/**/*.d.ts /nativescript-angular/**/*.js @@ -13,7 +13,16 @@ tags !/nativescript-angular/postinstall.js !/nativescript-angular/hooks/**/*.js !/nativescript-angular/gulpfile.js -!/nativescript-angular/zone-js/**/*.js +!/nativescript-angular/zone-js/dist/*.js + +/nativescript-angular-package/**/*.d.ts +/nativescript-angular-package/**/*.js + +!/nativescript-angular-package/global.d.ts +!/nativescript-angular-package/postinstall.js +!/nativescript-angular-package/hooks/**/*.js +!/nativescript-angular-package/gulpfile.js +!/nativescript-angular-package/zone-js/dist/*.js .tscache .nvm @@ -23,24 +32,15 @@ npm-debug.log nativescript-angular*.tgz package-lock.json +# Apps' JS files tests/app/**/*.js tests/test-output.txt -tests/platforms -tests/lib -tests/node_modules -tests/hooks - ng-sample/app/**/*.js -ng-sample/app/global.d.ts -ng-sample/platforms -ng-sample/lib -ng-sample/node_modules -ng-sample/hooks -ng-sample/app/nativescript-angular -startup-test/platforms -startup-test/lib -startup-test/node_modules +# Webpack configuration files +webpack.config.js +tsconfig.esm.json +tsconfig.tns.json # IDEs and editors /.idea @@ -56,3 +56,4 @@ startup-test/node_modules !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json + diff --git a/.travis.yml b/.travis.yml index 6cfafd7c2..7f437f40b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,143 +1,8 @@ -env: - global: - - NODE_VERSION=6 - - NODE_VERSION=8 - - EMULATOR_API_LEVEL=22 - - ANDROID_VERSION=25 - - ANDROID_BUILD_TOOLS_VERSION=26.0.2 - - ANDROID_ABI=armeabi-v7a - - APPIUM_VERSION=1.7.0 - - EMULATOR_NAME=test - - ANDROID_TAG=google_apis - -matrix: - include: - - stage: "Lint" - language: node_js - os: linux - before_install: - - nvm install $NODE_VERSION - script: - - cd nativescript-angular - - npm install - - npm run tslint - - stage: "Build" - os: osx - env: - - Build="iOS" - osx_image: xcode8.3 - language: node_js - node_js: "6" - jdk: oraclejdk8 - before_install: - - cd nativescript-angular - - npm install - - cd ../tests - - npm install - - cd .. - script: - - cd nativescript-angular - - npm run ngc - - cd ../tests - - tns build ios - - os: osx - env: - - Build="iOS" - osx_image: xcode8.3 - language: node_js - node_js: "8" - jdk: oraclejdk8 - before_install: - - cd nativescript-angular - - npm install - - cd ../tests - - npm install - - cd .. - script: - - cd nativescript-angular - - npm run ngc - - cd ../tests - - tns build ios - - language: android - node_js: "6" - os: linux - env: - - Build="Android" - jdk: oraclejdk8 - before_install: - - echo no | android create avd --force -n $EMULATOR_NAME -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG -c 12M - - QEMU_AUDIO_DRV=none emulator -avd $EMULATOR_NAME -no-window & - - nvm install $NODE_VERSION - - cd nativescript-angular - - npm install - - cd ../tests - - npm install - - cd .. - - android-wait-for-emulator - - adb shell input keyevent 82 & - script: - - cd nativescript-angular - - npm run ngc - - cd ../tests - - tns build android - - language: android - node_js: "8" - os: linux - env: - - Build="Android" - jdk: oraclejdk8 - before_install: - - echo no | android create avd --force -n $EMULATOR_NAME -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG -c 12M - - QEMU_AUDIO_DRV=none emulator -avd $EMULATOR_NAME -no-window & - - nvm install $NODE_VERSION - - cd nativescript-angular - - npm install - - cd ../tests - - npm install - - cd .. - - android-wait-for-emulator - - adb shell input keyevent 82 & - script: - - cd nativescript-angular - - npm run ngc - - cd ../tests - - tns build android - -android: - components: - - tools - - platform-tools - - build-tools-25.0.2 - - build-tools-$ANDROID_BUILD_TOOLS_VERSION - - android-25 - - android-$EMULATOR_API_LEVEL - - extra-google-google_play_services - - extra-google-m2repository - - extra-android-m2repository - - addon-google_apis-google-25 - # Specify at least one system image, - # if you need to run emulator(s) during your tests - - sys-img-armeabi-v7a-android-26 - - sys-img-armeabi-v7a-android-25 - - sys-img-armeabi-v7a-android-17 - - sys-img-armeabi-v7a-android-19 - - sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL - licenses: - - ".+" - -before_cache: - - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock - -cache: - directories: - - .nvm - - $HOME/.gradle/caches/ - - $HOME/.gradle/wrapper/ - -install: - - nvm install $NODE_VERSION - - npm install -g typings - - wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz" - - npm install -g nativescript.tgz --ignore-scripts - - tns usage-reporting disable - - tns error-reporting disable +language: node_js +node_js: + - "node" +script: + - cd nativescript-angular + - npm install + - npm run format-check + - npm pack diff --git a/CHANGELOG.md b/CHANGELOG.md index eaa1cdc72..e7e0c6b06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,672 @@ +# [11.2.0](https://github.com/NativeScript/nativescript-angular/compare/11.0.1...11.2.0) (2021-03-24) + + +### Bug Fixes + +* **ivy:** nsRouterLinkActive works on nsRouterLink ([#2322](https://github.com/NativeScript/nativescript-angular/issues/2322)) ([13a3562](https://github.com/NativeScript/nativescript-angular/commit/13a3562146ef8516fea8bb3d988f8e0ddc9617a7)) + + + +## [11.0.1](https://github.com/NativeScript/nativescript-angular/compare/11.0.0...11.0.1) (2021-01-22) + + +### Bug Fixes + +* blank screen on hmr ([#2317](https://github.com/NativeScript/nativescript-angular/issues/2317)) ([197d802](https://github.com/NativeScript/nativescript-angular/commit/197d802976ddf4ae3bba45f2d000a687049c8027)) + + + +# [11.0.0](https://github.com/NativeScript/nativescript-angular/compare/10.1.7...11.0.0) (2020-11-17) + + +### Features + +* **angular:** v11 ([#2297](https://github.com/NativeScript/nativescript-angular/issues/2297)) ([e3657c4](https://github.com/NativeScript/nativescript-angular/commit/e3657c446db7af23d50f8514d001e5709c2b7788)) + + + +## [10.1.7](https://github.com/NativeScript/nativescript-angular/compare/10.1.5...10.1.7) (2020-10-12) + + +### Bug Fixes + +* Export injection token used by plugins ([#2268](https://github.com/NativeScript/nativescript-angular/issues/2268)) ([75865f2](https://github.com/NativeScript/nativescript-angular/commit/75865f214d9e53eb36990c779808d50fb697f1ce)) +* expose NSLocationStrategy and NSRouteReuseStrategy ([9b8435e](https://github.com/NativeScript/nativescript-angular/commit/9b8435e13b7f6f42098e79895af5ab3156d1aac3)) + + +### Features + +* export injectiontoken for template items ([52a56d7](https://github.com/NativeScript/nativescript-angular/commit/52a56d7201b70b67edb2ca77e9042737f216a07a)) + + + +## [10.1.5](https://github.com/NativeScript/nativescript-angular/compare/10.1.4...10.1.5) (2020-09-21) + + +### Bug Fixes + +* **renderer:** dynamic views can't be prepended ([#2262](https://github.com/NativeScript/nativescript-angular/issues/2262)) ([5735a01](https://github.com/NativeScript/nativescript-angular/commit/5735a01695d7967b5a63222dcec760ddac0533e3)) + + + +## [10.1.4](https://github.com/NativeScript/nativescript-angular/compare/10.1.3...10.1.4) (2020-09-21) + + +### Bug Fixes + +* **detached-loader:** detach loadWithFactory ([#2260](https://github.com/NativeScript/nativescript-angular/issues/2260)) ([1dca81b](https://github.com/NativeScript/nativescript-angular/commit/1dca81bbc4a1a05a9eefe13988848124885f3178)) +* **renderer:** order not preserved ([#2261](https://github.com/NativeScript/nativescript-angular/issues/2261)) ([07abb9e](https://github.com/NativeScript/nativescript-angular/commit/07abb9e62c2408be83e8a694384cd529ba5d3309)) + + + +## [10.1.3](https://github.com/NativeScript/nativescript-angular/compare/10.1.0...10.1.3) (2020-09-21) + + +### Bug Fixes + +* **detached-loader:** completely deatch components ([#2257](https://github.com/NativeScript/nativescript-angular/issues/2257)) ([623d2f7](https://github.com/NativeScript/nativescript-angular/commit/623d2f79e014017fd993685051d125b3c5c72ada)) +* **ivy:** support view references in insertBefore ([#2258](https://github.com/NativeScript/nativescript-angular/issues/2258)) ([c2eaef5](https://github.com/NativeScript/nativescript-angular/commit/c2eaef52a66dbbee982f73bb968a706cee38f633)) + + + +# [10.1.0](https://github.com/NativeScript/nativescript-angular/compare/10.0.3...10.1.0) (2020-09-04) + + +### Bug Fixes + +* **list-view:** fix crash when used with ngFor ([#2121](https://github.com/NativeScript/nativescript-angular/issues/2121)) ([302afb3](https://github.com/NativeScript/nativescript-angular/commit/302afb350dea56ddbf1a0d772f6d9405413890a5)) + + +### Features + +* **angular:** ng 10.1 and ns 7 ([#2237](https://github.com/NativeScript/nativescript-angular/issues/2237)) ([548e074](https://github.com/NativeScript/nativescript-angular/commit/548e0743eb092ba3fa371ea4d26879ee5bf03983)) + + + +## [10.0.3](https://github.com/NativeScript/nativescript-angular/compare/10.0.2...10.0.3) (2020-08-27) + + +### Bug Fixes + +* **router:** page navigation bug if there's not outlet for frame after clearing history ([#2233](https://github.com/NativeScript/nativescript-angular/issues/2233)) ([8bedc2d](https://github.com/NativeScript/nativescript-angular/commit/8bedc2d14fccc8d6c1ea18151bda7ce7c87fddae)) + + + +## [10.0.2](https://github.com/NativeScript/nativescript-angular/compare/10.0.1...10.0.2) (2020-08-19) + + +### Bug Fixes + +* **router:** link active directive ([#2227](https://github.com/NativeScript/nativescript-angular/issues/2227)) ([5e165b5](https://github.com/NativeScript/nativescript-angular/commit/5e165b56c7a61d28fdb279ed8da07288e6dbb7af)) + + + +# [10.0.0](https://github.com/NativeScript/nativescript-angular/compare/8.20.4...10.0.0) (2020-07-30) + +### Features + +* **angular:** support for v10 ([#2189](https://github.com/NativeScript/nativescript-angular/issues/2189)) ([fd71458](https://github.com/NativeScript/nativescript-angular/commit/fd714588dc93762c2d5a129d3a08c92317df68e4)) +* ivy support ([#2169](https://github.com/NativeScript/nativescript-angular/issues/2169)) ([f10a8fb](https://github.com/NativeScript/nativescript-angular/commit/f10a8fb9f7c8bbe35be10c736210a451f8c52670)), closes [#2152](https://github.com/NativeScript/nativescript-angular/issues/2152) [#2060](https://github.com/NativeScript/nativescript-angular/issues/2060) +* support for async APP_INITIALIZER and animated launch screens ([#2170](https://github.com/NativeScript/nativescript-angular/issues/2170)) ([b6ac290](https://github.com/NativeScript/nativescript-angular/commit/b6ac29038e27c310803ce956f7d93aca4d8ecd2a)) + +### Bug Fixes + +* **router:** query params are now preserved when navigating back ([#2062](https://github.com/NativeScript/nativescript-angular/issues/2062)) ([221e404](https://github.com/NativeScript/nativescript-angular/commit/221e404da244b64004cfb3cd3e947858133af347)) +* **segmented-bar:** listview crash when scrolling ([#2128](https://github.com/NativeScript/nativescript-angular/issues/2128)) ([1b191b0](https://github.com/NativeScript/nativescript-angular/commit/1b191b06ccd0df2871ef741ab97f14c04911864e)) + + + + +# [9.0.0](https://github.com/NativeScript/nativescript-angular/compare/8.20.4...9.0.0) (2020-06-03) + + + +### Bug Fixes + +* **bindable:** parent referenced expression-values now load properly using an update call ([#8670](https://github.com/NativeScript/NativeScript/issues/8670)) ([6b0028a](https://github.com/NativeScript/NativeScript/commit/6b0028afd7b554914b039cdf371e8e30f6e02dac)), closes [#8666](https://github.com/NativeScript/NativeScript/issues/8666) [#6981](https://github.com/NativeScript/NativeScript/issues/6981) [#5054](https://github.com/NativeScript/NativeScript/issues/5054) +* **scroll-view:** android 'isScrollEnabled' will apply if changed while gesture is underway ([#8695](https://github.com/NativeScript/NativeScript/issues/8695)) ([02ec7f1](https://github.com/NativeScript/NativeScript/commit/02ec7f104d327df53df687ddd1b8ac5b1cdc04ba)) +* **snapshots:** android is not defined ([#8691](https://github.com/NativeScript/NativeScript/issues/8691)) ([a8bbd7c](https://github.com/NativeScript/NativeScript/commit/a8bbd7c1e580e77e7ad5ddc7be6845e3d8fb02de)) +* **text-view:** only reload text if hint is showing on ios ([#8662](https://github.com/NativeScript/NativeScript/issues/8662)) ([ec17727](https://github.com/NativeScript/NativeScript/commit/ec17727e91f7a3209ada2c7de0bcf59c98c4e62a)) + + +### Features + +* **connectivity:** getActiveNetworkInfo and NetworkInfo modern compliance [#8580](https://github.com/NativeScript/NativeScript/issues/8580) ([#8652](https://github.com/NativeScript/NativeScript/issues/8652)) ([635f31f](https://github.com/NativeScript/NativeScript/commit/635f31f81f7826112142c707aff2a66c2b480b0e)) +* **dialog:** ios destructive style from options ([#8676](https://github.com/NativeScript/NativeScript/issues/8676)) ([bb531ce](https://github.com/NativeScript/NativeScript/commit/bb531ce71028f9c4fd4d753df16c82104f158e35)) +* **ImageSource:** resize method ([#8678](https://github.com/NativeScript/NativeScript/issues/8678)) ([bd12baf](https://github.com/NativeScript/NativeScript/commit/bd12bafb4aae8f1c523be4c7e04fa73722092304)) +* **text-view:** allow easy subclassing on ios ([#8663](https://github.com/NativeScript/NativeScript/issues/8663)) ([7d36447](https://github.com/NativeScript/NativeScript/commit/7d364474c23e17acf7696f159d3945d8a73d63e6)) + + +### Features + +* angular 9 ivy ([fbe2450](https://github.com/NativeScript/nativescript-angular/commit/fbe2450)) + + + +## [8.20.4](https://github.com/NativeScript/nativescript-angular/compare/8.20.3...8.20.4) (2020-01-07) + + +### Bug Fixes + +* add context to frame navigation ([#2100](https://github.com/NativeScript/nativescript-angular/pull/2100)) +* wrong import path in compat package ([#2097](https://github.com/NativeScript/nativescript-angular/pull/2097)) + + + + +## [8.20.3](https://github.com/NativeScript/nativescript-angular/compare/8.20.2...8.20.3) (2019-11-13) + + +### Bug Fixes + +* add exports for backwards compatibility ([fbd46c1](https://github.com/NativeScript/nativescript-angular/commit/fbd46c1)) + + +## [8.20.2](https://github.com/NativeScript/nativescript-angular/compare/8.20.1...8.20.2) (2019-11-12) + + +### Bug Fixes + +* add exports in `nativescript-angular` package for backwards compatibility ([4a5d022](https://github.com/NativeScript/nativescript-angular/commit/4a5d022)) + + + +# [8.20.1](https://github.com/NativeScript/nativescript-angular/compare/8.20.0...8.20.1) (2019-11-07) + +### Bug Fixes + +* add exports in `nativescript-angular` package for backwards compatibility + +# [8.20.0](https://github.com/NativeScript/nativescript-angular/compare/8.2.2...8.20.0) (2019-10-23) + +### Features +* add scoped package @nativescript/angular ([#2014](https://github.com/NativeScript/nativescript-angular/pull/2014)) + +### Bug Fixes + +* **animations:** resolve issue with "query animations" on iOS 13 ([#2022](https://github.com/NativeScript/nativescript-angular/issues/2022)) ([c382682](https://github.com/NativeScript/nativescript-angular/commit/c382682)) + + +## [8.2.2](https://github.com/NativeScript/nativescript-angular/compare/8.2.1...8.2.2) (2019-10-16) + +### Features + +* Support for adding scoped CSS without triggering global refresh ([#1999](https://github.com/NativeScript/nativescript-angular/pull/1999)) ([662c122](https://github.com/NativeScript/nativescript-angular/commit/662c122)) + + + + +## [8.2.1](https://github.com/NativeScript/nativescript-angular/compare/8.2.0...8.2.1) (2019-08-28) + + +### Bug Fixes + +* **hmr:** close modal views during livesync [#7669](https://github.com/NativeScript/nativescript-angular/issues/7669) ([#1944](https://github.com/NativeScript/nativescript-angular/issues/1944)) ([73d83ed](https://github.com/NativeScript/nativescript-angular/commit/73d83ed)) + + + + +# [8.2.0](https://github.com/NativeScript/nativescript-angular/compare/8.1.0...8.2.0) (2019-08-13) + + +### Features + +* Update to Angular 8.2.x ([dbe983b](https://github.com/NativeScript/nativescript-angular/commit/dbe983b)) +* Remove `@angular/http` from the dependecies ([#1842](https://github.com/NativeScript/nativescript-angular/issues/1842)) ([c6af21d](https://github.com/NativeScript/nativescript-angular/commit/c6af21d)) + +### BREAKING CHANGES: + +* The `NativeScriptHttpModule` is removed +* `@angular/http` is removed from the dependencies + +Migration steps: +* If using `NativeScriptHttpModule`, replace with `NativeScriptHttpClientModule` as done [here](https://github.com/NativeScript/nativescript-sdk-examples-ng/commit/16d3caee2b0ee2d88d328b75bde49eea6c96920a) +* as `@angular/http` is no longer a peerDependency of `nativescript-angular`, you can remove if from your dependencies + + + +# [8.1.0](https://github.com/NativeScript/nativescript-angular/compare/8.0.3...8.1.0) (2019-07-31) + + +### Features + +* update to Angular 8.1.x ([#1907](https://github.com/NativeScript/nativescript-angular/issues/1907)) ([e1db5f8](https://github.com/NativeScript/nativescript-angular/commit/e1db5f8)) + + + +## [8.0.3](https://github.com/NativeScript/nativescript-angular/compare/8.0.2...8.0.3) (2019-07-26) + + +### Bug Fixes + +* add backwards compatibility for 'tns-core-modules' version 5.4.x ([635bb36](https://github.com/NativeScript/nativescript-angular/commit/635bb36)) + + +### Features + +* **tabs:** register tabs elements ([#1883](https://github.com/NativeScript/nativescript-angular/issues/1883)) ([092a833](https://github.com/NativeScript/nativescript-angular/commit/092a833)) + + + + +## [8.0.2](https://github.com/NativeScript/nativescript-angular/compare/8.0.1...8.0.2) (2019-06-28) + +### Bug Fixes + + * remove deprecated API usage ([#1874](https://github.com/NativeScript/nativescript-angular/pull/1874)) ([ab740cd](https://github.com/NativeScript/nativescript-angular/commit/ab740cd)) + * migrate from ReflectiveInjector (deprecated) to StaticInjector ([#1868](https://github.com/NativeScript/nativescript-angular/pull/1868)) ([e432841](https://github.com/NativeScript/nativescript-angular/pull/1868/commits/e432841e9b474ad188f87044b74666b322d68b5d)) + + ### Features + +* Update peer dependencies to Angular 8.x.x ([#1857](https://github.com/NativeScript/nativescript-angular/pull/1857)) ([060aabf](https://github.com/NativeScript/nativescript-angular/pull/1857/commits/060aabf146aa0f132f3617dcfaeea0efa7baf228)) +* **tabs:** register tabs elements ([#1883](https://github.com/NativeScript/nativescript-angular/issues/1883)) ([092a833](https://github.com/NativeScript/nativescript-angular/commit/092a833)) + + + +## [8.0.1](https://github.com/NativeScript/nativescript-angular/compare/8.0.0...8.0.1) (2019-06-12) + + +### Bug Fixes + +* do not throw if element already registered ([#1838](https://github.com/NativeScript/nativescript-angular/issues/1838)) ([e90f8b5](https://github.com/NativeScript/nativescript-angular/commit/e90f8b5)) +* **1845:** CSS special selector ":host" only work first time ([#1852](https://github.com/NativeScript/nativescript-angular/issues/1852)) ([59a5bd8](https://github.com/NativeScript/nativescript-angular/commit/59a5bd8)) + + + + +# [8.0.0](https://github.com/NativeScript/nativescript-angular/compare/7.2.4...8.0.0) (2019-05-29) + + +### Bug Fixes + +* **router:** fix return value for getTransition of NSRouterLink ([d20b645](https://github.com/NativeScript/nativescript-angular/commit/d20b645)), closes [#1784](https://github.com/NativeScript/nativescript-angular/issues/1784) +* **tsconfig:** exclude aot files from compilation ([a4eb409](https://github.com/NativeScript/nativescript-angular/commit/a4eb409)) + + +### Features + +* upgrade to Angular 8 ([b16046d](https://github.com/NativeScript/nativescript-angular/commit/b16046d)) + + +### BREAKING CHANGES + +* In Angular version 8, it's required that all `@ViewChild` and `@ContentChild` queries have a `static` flag specifying whether the query is `static` or `dynamic`. More details about this change can be found [here](https://angular.io/guide/static-query-migration). + +Migration steps: + +Anywhere you previously had `@ViewChild` with a single param you now have to provide a second param with a `static` property set to either `true` or `false` + +**Previous code:** +``` +import { ElementRef } from "@angular/core"; + +@ViewChild("myElement") myElement: ElementRef; +``` + +**Migrated code:** +``` +import { ElementRef } from "@angular/core"; + +@ViewChild("myElement", { static: false }) myElement: ElementRef; +``` + + + +## [7.2.4](https://github.com/NativeScript/nativescript-angular/compare/7.2.3...7.2.4) (2019-05-14) + + +### Bug Fixes + +* **router:** routing services should be provided in forRoot only ([#1729](https://github.com/NativeScript/nativescript-angular/issues/1729)) ([0f6a975](https://github.com/NativeScript/nativescript-angular/commit/0f6a975)) +* mark reattached view for CD ([#1803](https://github.com/NativeScript/nativescript-angular/issues/1803)) ([b6dbe57](https://github.com/NativeScript/nativescript-angular/commit/b6dbe57)) +* Potentiel leak: NativeScript views not cleaned up on removal ([#1738](https://github.com/NativeScript/nativescript-angular/issues/1738)) ([59a1cde](https://github.com/NativeScript/nativescript-angular/commit/59a1cde)) + +### Features + +* **modal:** add ‘ios presentationStyle’ option to ModalDialogParams ([9cfa127](https://github.com/NativeScript/nativescript-angular/commit/9cfa127)) + + + + +## [7.2.3](https://github.com/NativeScript/nativescript-angular/compare/7.2.2...7.2.3) (2019-03-14) + + +### Bug Fixes + +* **location-strategy:** crash on going back with router-outlet after closing modal ([#1748](https://github.com/NativeScript/nativescript-angular/issues/1748)) ([0ed7de6](https://github.com/NativeScript/nativescript-angular/commit/0ed7de6)) + + + + +## [7.2.2](https://github.com/NativeScript/nativescript-angular/compare/7.2.1...7.2.2) (2019-02-19) + + +### Bug Fixes + +* **list-view:** add support for default item template ([4061cc7](https://github.com/NativeScript/nativescript-angular/commit/4061cc7)) + + + + +## [7.2.1](https://github.com/NativeScript/nativescript-angular/compare/7.2.0...7.2.1) (2019-02-10) + + +### Bug Fixes + +* **location-strategy:** extend support for nested primary outlets ([566896d](https://github.com/NativeScript/nativescript-angular/commit/566896d)) +* Router tracing does not work with webpack ([e87ef68](https://github.com/NativeScript/nativescript-angular/commit/e87ef68)) + + + + +# [7.2.0](https://github.com/NativeScript/nativescript-angular/compare/7.1.2...7.2.0) (2019-01-31) + + +### Bug Fixes + +* **p-r-o:** needless forward navigation after back inside nested named outlet ([130e392](https://github.com/NativeScript/nativescript-angular/commit/130e392)) + + +### Features + +* **router:** detach change detection on navigation ([#1507](https://github.com/NativeScript/nativescript-angular/issues/1507)) ([86cd290](https://github.com/NativeScript/nativescript-angular/commit/86cd290)) + + + + +## [7.1.2](https://github.com/NativeScript/nativescript-angular/compare/7.1.1...7.1.2) (2019-01-21) + + +### Bug Fixes + + * **page-router-outlet:** fix(empty-outlet): remove unnecessary moduleId ([#1686](https://github.com/NativeScript/nativescript-angular/issues/1686)) ([1222e57](https://github.com/NativeScript/nativescript-angular/commit/1222e57)) + + + +## [7.1.1](https://github.com/NativeScript/nativescript-angular/compare/7.1.0...7.1.1) (2018-12-20) + + +### Bug Fixes + + * **page-router-outlet:** prevent needless forward navigation after back inside nested named outlet ([d8a0653](https://github.com/NativeScript/nativescript-angular/commit/d8a0653)) + + + + +# [7.1.0](https://github.com/NativeScript/nativescript-angular/compare/7.0.3...7.1.0) (2018-12-07) + + +### Features + +* Angular 7.1 support + + +## [7.0.3](https://github.com/NativeScript/nativescript-angular/compare/7.0.2...7.0.3) (2018-12-05) + + +### Bug Fixes + +* **router:** handle nested primary p-r-o ([#1645](https://github.com/NativeScript/nativescript-angular/issues/1645)) ([e632fc5](https://github.com/NativeScript/nativescript-angular/commit/e632fc5)) + + + + +## [7.0.2](https://github.com/NativeScript/nativescript-angular/compare/7.0.1...7.0.2) (2018-11-26) + + +### Bug Fixes + +* **page-router-outlet:** actionBarVisibility not applied ([#1621](https://github.com/NativeScript/nativescript-angular/issues/1621)) ([a6ff509](https://github.com/NativeScript/nativescript-angular/commit/a6ff509)) +* **router-extensions:** unable to go back with relativeTo param ([#1632](https://github.com/NativeScript/nativescript-angular/issues/1632)) ([63900dc](https://github.com/NativeScript/nativescript-angular/commit/63900dc)) + + + + +## [7.0.1](https://github.com/NativeScript/nativescript-angular/compare/7.0.0...7.0.1) (2018-11-20) + + +### Bug Fixes + +* crash in deactivate page router outlet ([#1590](https://github.com/NativeScript/nativescript-angular/issues/1590)) ([f8c7468](https://github.com/NativeScript/nativescript-angular/commit/f8c7468)) +* **dialogs:** unable to reopen shared modal view when tab as root ([199c245](https://github.com/NativeScript/nativescript-angular/commit/199c245)) +* **location-strategy:** crash when going back on nested named lazy loaded module ([#1618](https://github.com/NativeScript/nativescript-angular/issues/1618)) ([d9ffb83](https://github.com/NativeScript/nativescript-angular/commit/d9ffb83)) + + + + +# [7.0.0](https://github.com/NativeScript/nativescript-angular/compare/6.2.0...7.0.0) (2018-11-12) + + +### Bug Fixes + +* crash in deactivate page router outlet ([#1590](https://github.com/NativeScript/nativescript-angular/issues/1590)) ([f8c7468](https://github.com/NativeScript/nativescript-angular/commit/f8c7468)) + +* **location-strategy:** crash on going back to TabView with nested outlets ([#1582](https://github.com/NativeScript/nativescript-angular/issues/1582)) ([f755991](https://github.com/NativeScript/nativescript-angular/commit/f755991)) + + +### Features + +* Angular 7 support + + + + +# [6.2.0](https://github.com/NativeScript/nativescript-angular/compare/6.1.0...6.2.0) (2018-10-30) + + +### Bug Fixes + +* **frame-service:** move FrameService provider to NativeScriptModule ([#1489](https://github.com/NativeScript/nativescript-angular/issues/1489)) ([3b434c9](https://github.com/NativeScript/nativescript-angular/commit/3b434c9)) +* Import reflect-metadata(needed in JIT mode) before [@angular](https://github.com/angular) ([#1530](https://github.com/NativeScript/nativescript-angular/issues/1530)) ([6e45af0](https://github.com/NativeScript/nativescript-angular/commit/6e45af0)) +* Persist the original "parentNode" when "retrieving" the root View created by createEmbeddedView ([#1542](https://github.com/NativeScript/nativescript-angular/issues/1542)) ([0b8d2c5](https://github.com/NativeScript/nativescript-angular/commit/0b8d2c5)) + + +### Features + +* add actionBarVisibility property to page-router-outlet ([#1573](https://github.com/NativeScript/nativescript-angular/issues/1573)) ([c645ca8](https://github.com/NativeScript/nativescript-angular/commit/c645ca8)) +* enable nesting named page router outlets ([#1556](https://github.com/NativeScript/nativescript-angular/issues/1556)) ([46a0dc0](https://github.com/NativeScript/nativescript-angular/commit/46a0dc0)) +* HMR bootstrap and livesync options ([#1531](https://github.com/NativeScript/nativescript-angular/issues/1531)) ([1e92c7b](https://github.com/NativeScript/nativescript-angular/commit/1e92c7b)) + + + + +## [6.1.0](https://github.com/NativeScript/nativescript-angular/compare/6.0.6...6.1.0) (2018-08-06) + + +### Bug Fixes + +* mark NativeScriptModule as root injector ([#1418](https://github.com/NativeScript/nativescript-angular/issues/1418)) ([ce70add](https://github.com/NativeScript/nativescript-angular/commit/ce70add)) +* provide NullViewportScroller in NativeScriptModule ([dd412bf](https://github.com/NativeScript/nativescript-angular/commit/dd412bf)) +* **animations:** inject document object in the animation engine ([#1395](https://github.com/NativeScript/nativescript-angular/issues/1395)) ([379e958](https://github.com/NativeScript/nativescript-angular/commit/379e958)), closes [angular/angular#23300](https://github.com/angular/angular/issues/23300) [#1393](https://github.com/NativeScript/nativescript-angular/issues/1393) +* **forms:** TextValueAccessor raises onTouched on blur ([#1230](https://github.com/NativeScript/nativescript-angular/issues/1230)) ([06ca3a0](https://github.com/NativeScript/nativescript-angular/commit/06ca3a0)) +* remove global document object ([2b201be](https://github.com/NativeScript/nativescript-angular/commit/2b201be)) +* **location-strategy:** find the correct outlet when navigating back and forward ([#1404](https://github.com/NativeScript/nativescript-angular/issues/1404)) ([f0119a0](https://github.com/NativeScript/nativescript-angular/commit/f0119a0)) +* **modal:** lower isModalNavigation flag when closing modal ([#1378](https://github.com/NativeScript/nativescript-angular/issues/1378)) ([6ab1cac](https://github.com/NativeScript/nativescript-angular/commit/6ab1cac)) +* **modal:** throw from tns-core-modules is now properly caught and rejected ([70730d9](https://github.com/NativeScript/nativescript-angular/commit/70730d9)) +* **router:** avoiding throw for app stability improvements ([#1344](https://github.com/NativeScript/nativescript-angular/issues/1344)) ([82747df](https://github.com/NativeScript/nativescript-angular/commit/82747df)) +* **tabview:** implement setter for TabViewItem Directive's configuration ([#845](https://github.com/NativeScript/nativescript-angular/issues/845)) ([#1370](https://github.com/NativeScript/nativescript-angular/issues/1370)) ([1d44679](https://github.com/NativeScript/nativescript-angular/commit/1d44679)) + + +### Features + +* **test-bed:** Run render fixtures in a full-page container ([#1416](https://github.com/NativeScript/nativescript-angular/issues/1416)) ([e551df2](https://github.com/NativeScript/nativescript-angular/commit/e551df2)) + + +### BREAKING CHANGES + +* The `document` object is no longer property of the `global` object. This +may cause behavioral changes in some plugin that use the `document` +object to determine if they're running in browser context. + +Fixes https://github.com/NativeScript/nativescript-angular/issues/1144. + + + +## [6.0.6](https://github.com/NativeScript/nativescript-angular/compare/6.0.0...6.0.6) (2018-06-22) + +> IMPORTANT! You should use this version with @angular/* v6.0.6 and up. + +### Bug Fixes + +* clean up properly shared modal page router outlets ([#1360](https://github.com/NativeScript/nativescript-angular/issues/1360)) ([3332ca2](https://github.com/NativeScript/nativescript-angular/commit/3332ca2)) +* **animations:** inject document object in the animation engine ([#1395](https://github.com/NativeScript/nativescript-angular/issues/1395)) ([379e958](https://github.com/NativeScript/nativescript-angular/commit/379e958)), closes [#1393](https://github.com/NativeScript/nativescript-angular/issues/1393) +* **modal:** lower isModalNavigation flag when closing modal ([#1378](https://github.com/NativeScript/nativescript-angular/issues/1378)) ([6ab1cac](https://github.com/NativeScript/nativescript-angular/commit/6ab1cac)) + + + +# [6.0.0](https://github.com/NativeScript/nativescript-angular/compare/5.3.0...6.0.0) (2018-05-30) + + +### Bug Fixes + +* Use cssType (uglify safe) instead typeName of for view metadata. ([d85910c](https://github.com/NativeScript/nativescript-angular/commit/d85910c)) +* **modal:** closeCallback(...) should not have side effects when called multiple times ([#1349](https://github.com/NativeScript/nativescript-angular/issues/1349)) ([bffbbc2](https://github.com/NativeScript/nativescript-angular/commit/bffbbc2)) +* **modal:** missing animated & stretched params ([#1293](https://github.com/NativeScript/nativescript-angular/issues/1293)) ([a9a901b](https://github.com/NativeScript/nativescript-angular/commit/a9a901b)) +* **router:** state is not guarded before use ([#1331](https://github.com/NativeScript/nativescript-angular/issues/1331)) ([d27a893](https://github.com/NativeScript/nativescript-angular/commit/d27a893)), closes [/github.com/NativeScript/nativescript-angular/commit/b98da83adb3f5c51ee448fa38a51b7c65274c82e#diff-a7820fa2a2eb0ce14f3f0b8bfc666dd5R49](https://github.com//github.com/NativeScript/nativescript-angular/commit/b98da83adb3f5c51ee448fa38a51b7c65274c82e/issues/diff-a7820fa2a2eb0ce14f3f0b8bfc666dd5R49) +* **TabViewItemDirective :** textTransform property added ([#1315](https://github.com/NativeScript/nativescript-angular/issues/1315)) ([11d01f9](https://github.com/NativeScript/nativescript-angular/commit/11d01f9)) + + +### Features + +* Angular 6 support +* **router:** enable flexible page router outlets ([#1298](https://github.com/NativeScript/nativescript-angular/issues/1298)) ([b98da83](https://github.com/NativeScript/nativescript-angular/commit/b98da83)) +* **testing:** Testing Components with TestBed ([#1175](https://github.com/NativeScript/nativescript-angular/issues/1175)) ([52f3ec6](https://github.com/NativeScript/nativescript-angular/commit/52f3ec6)) + + + +# [5.3.0](https://github.com/NativeScript/nativescript-angular/compare/5.2.0...v5.3.0) (2018-04-10) + +> This version requires NativeScript 4.0. + +### Bug Fixes + +* **animations:** provide fake document object in both AoT and JiT mode ([#1164](https://github.com/NativeScript/nativescript-angular/issues/1164)) ([040e0e3](https://github.com/NativeScript/nativescript-angular/commit/040e0e3)), closes [#1163](https://github.com/NativeScript/nativescript-angular/issues/1163) +* App crashes on restart in android ([#1261](https://github.com/NativeScript/nativescript-angular/issues/1261)) ([331b878](https://github.com/NativeScript/nativescript-angular/commit/331b878)) + + +### Features + +* NS 4.0 Integration ([#1250](https://github.com/NativeScript/nativescript-angular/issues/1250)) ([f84fbdc](https://github.com/NativeScript/nativescript-angular/commit/f84fbdc)) +* prevent core modules from getting loaded multiple times ([#1196](https://github.com/NativeScript/nativescript-angular/issues/1196)) ([010fed7](https://github.com/NativeScript/nativescript-angular/commit/010fed7)) + + +### BREAKING CHANGES + +#### Importing `NativeScriptModule` and `NativeScriptAnimationsModule` in multiple ngModules is no longer allowed. + +To migrate: + * in `AppModule`: + * import `NativeScriptModule` + * import`NativeScriptAnimationsModule` - only if you are planning to use Angular Animations + * in the remaining modules: + * remove `NativeScriptModule` imports and replace with `NativeScriptCommonModule` import + * remove `NativeScriptAnimationsModule` imports + +BEFORE: + +app.module.ts: +``` +import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; +import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; +... +@NgModule({ + imports: [ + NativeScriptModule, + NativeScriptAnimationsModule + ], +... +}) +``` + +another.module.ts: +``` +import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; +import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; +... +@NgModule({ + imports: [ + NativeScriptModule, + NativeScriptAnimationsModule + ], +... +}) +``` + +AFTER: + +app.module.ts: +``` +import { NativeScriptModule } from 'nativescript-angular/nativescript.module'; +import { NativeScriptAnimationsModule } from 'nativescript-angular/animations'; +... +@NgModule({ + imports: [ + NativeScriptModule, + NativeScriptAnimationsModule + ], +... +}) +``` + +another.module.ts: +``` +import { NativeScriptCommonModule } from 'nativescript-angular/common'; +... +@NgModule({ + imports: [ + NativeScriptCommonModule + ], +... +}) +``` + +#### NativeScript 4.0 Compatible Bootstrap and Navigation +NativeScript 4.0 allows you to put any view as the root (not only Frame) of the application. To support in angular projects we had to introduce some changes in how A{N}gular apps are bootstrapped. + +PREVIOUS BEHAVIOR + +Bootstrap creates a root `Frame` and initial `Page`. Then it bootstraps the angular application inside this page. Navigation with `` will always navigate in the `Frame` created by the bootstrap. + +Limitations: +- You cannot change the root view of the app (to `RadSideDrawer` for example). It is always the `Frame` created by the bootstrap. +- You can have only one `` as there is only one `Frame`. +- You always have a `Page` view wrapping your components. Because the `ActionBar` is part of that `Page` you can always change it with the `` component. + +NEW BEHAVIOR + +Bootstrap will **not** create root view by default. It will use the root view of your main application component as the root view of the application. The `` component will create its own `Frame` and will use it for navigation. It will also wrap the components you navigate to in a `Page` and will navigate to it as it did before. + +Which means: + +- You can use any view for application root. Finally, you can have application-wide `RadSideDrawer`. + +- You have more flexibility over where to place the ``, you can even have more than one for more advanced scenarios. + +- If you **don't use ``** in your app you will not get the default `Page` and `Frame`, which means you will not be able to inject them in you components or show the `ActionBar`. There is special `createFrameOnBootstrap` option you can pass on bootstrap to make things as _before_: +``` +platformNativeScript({ createFrameOnBootstrap: true }) + .bootstrapModuleFactory(AppModuleNgFactory); +``` + +- If you **are using ``** you probably don't have to do any changes. Bootstrap will not create `Frame` and `Page`, but the outlet will do that. It will also take care of providing `Page` and so the `ActionBar` should work as _before_. + + +WORKING WITH FRAMES + +There might be multiple frames (if you have multiple ``'s). Angular DI works with singletons, so it will always return one instance of `Frame`. We have introduced `FrameService` (still experimental) which has a `getFrame()` method. It will return the current frame (the one you have navigated last). + +#### Signature of `onAfterLivesync` changed + +The signature `onAfterLivesync` observable changed from: +``` +export const onAfterLivesync = new EventEmitter>(); +``` +to: +``` +export const onAfterLivesync = new EventEmitter<{ moduleRef?: NgModuleRef; error?: Error }>(); +``` + + # [5.2.0](https://github.com/NativeScript/nativescript-angular/compare/5.0.0...5.2.0) (2018-01-17) @@ -124,7 +793,7 @@ Angular apps described in [this](https://angular.io/guide/ngmodule-faq#q-browser Migration steps: In all NgModules, except the root one (`AppModule`), replace: ``` -import { NativeScriptModule } from "nativescript-angular/nativescript.module"; +import { NativeScriptModule } from "@nativescript/angular"; … @NgModule({ imports: [ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e66edd30..80bff2ab2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,6 +11,7 @@ Here are some guides on how to do that: - [Requesting Features](#requesting-features) - [Submitting a PR](#submitting-a-pr) - [Where to Start](#where-to-start) +- [Publishing new versions](#publishing-new-versions) @@ -76,3 +77,110 @@ It's our turn from there on! We will review the PR and discuss changes you might ## Where to Start If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-angular/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). + + +## Publishing new versions + + +## Releasing new versions +Instructions how to release a new version for **NativeScript Core Team Members**. + +![](./release-contribution-guide-schema-webpack.png?raw=true) + +1. Checkout release branch +``` +cd nativescript-angular/nativescript-angular && git checkout release && git pull +``` +#### If we prepare major or minor release, merge master in release branch else **skip this step**. +``` +git merge --ff-only origin/master +``` +*** Note: If there are commits in release branch which are not merged in master branch '-ff-merge' command will fail. +In this case the commits should be merge firstly from release in master branch as explained in section 'Merge changes from release into master' and then repeat step 1. + +2. Execute `npm i` to install dependencies: +``` +cd nativescript-angular && npm i +cd nativescript-angular-package && npm i +``` +3. Execute [`npm version`](https://docs.npmjs.com/cli/version) to bump the version in both `nativescript-angular` and `nativescript-angular-package` folders: +``` +npm --no-git-tag-version version [patch|minor|major] -m "release: cut the %s release" +``` +or +``` +npm --no-git-tag-version version [version] --allow-same-version -m "release: cut the %s release" +``` +NOTE: Check the changelog!!! + +4. Create release-branch with change log +``` +git checkout -b release-[version] +``` +5. Add changes +``` +git add changed-files +git commit -m "release: cut the %s release" +git push +``` +NOTE: Make sure the PR is based on release branch + +6. Merge PR into release branch. + +7. The merge will produce package with rc tag in npm. If all checks have passed, publish official package. Usually the night builds will be triggered and the package will be ready to be released on the next day. + +8. Don't forget to tag the release branch +``` +git tag [version] +git push --tags +``` +Only if needed to Tips to remove tags: +``` +git push --delete origin [version] +git tag -d [version] +``` + +## Checkout master branch and bump version usually should be minor or major. + +## Merge changes from release into master + +## NOTE: Don't use git IDE/WEB + +![](./merge-guidance-schema.png) + +### Here are steps described in the diagram above. + +1. Make sure you are in release branch: +``` +git checkout release && git pull +``` +2. Create PR to merge changes back in master and preserve history: +``` +git checkout -b merge-release-in-master-[branch]/[sha] +git push --set-upstream origin merge-release-in-master-branch-[branch]/[sha] +git merge origin/master +``` +3. Resolve conflicts. Choose to keep the version of master branch. If it is needed to revert versions of modules, see at the bottom. + +4. Add conflicts: +``` +git add resolved files +``` +5. Commit changes with default merge message: +``` +git commit +git push +``` + +6. Create pull request which should be based on master. Replace replace env merge-release-in-master-branch with its value +``` +curl -d '{"title": "chore: merge release in master","body": "chore: merge release in master","head": "merge-release-in-master","base": "master"}' -X POST https://api.github.com/repos/NativeScript/NativeScript/pulls -H "Authorization: token ${GIT_TOKEN}" +``` + +**If needed, to revert file and take it from master:** +``` +git checkout origin/master nativescript-angular/[some-file] +git commit --amend +git push --force-with-lease +``` +This could require to repeat steps from 1 to 4, since we need to keep the branches with the same history diff --git a/DevelopmentWorkflow.md b/DevelopmentWorkflow.md index d0e11860b..5df7f425b 100644 --- a/DevelopmentWorkflow.md +++ b/DevelopmentWorkflow.md @@ -2,13 +2,15 @@ -- [Running locally](#running-locally) +- [Development Workflow](#development-workflow) + - [Running locally](#running-locally) - [Prerequisites](#prerequisites) - - [Install dependencies](#install-dependencies) - - [Run the sample application (ng-sample)](#run-the-sample-application-ng-sample) -- [Running the tests](#running-the-tests) -- [Testing locally by running e2e tests](#testing-locally-by-running-e2e-tests) -- [Developer workflow](#developer-workflow) + - [Clone repository](#clone-repository) + - [Install dependencies of the compatibility package (nativescript-angular)](#install-dependencies-of-the-compatibility-package-nativescript-angular) + - [Install dependencies of the scoped package (@nativescript/angular)](#install-dependencies-of-the-scoped-package-nativescriptangular) + - [Run some of the e2e applications e.g. router-tab-view](#run-some-of-the-e2e-applications-eg-router-tab-view) + - [Running the tests](#running-the-tests) + - [Testing locally by running e2e tests](#testing-locally-by-running-e2e-tests) @@ -18,21 +20,34 @@ Install your native toolchain and NativeScript as described in the docs: -https://docs.nativescript.org/setup/quick-setup +https://docs.nativescript.org/angular/start/quick-setup +### Clone repository -### Install dependencies +``` +$ git clone git@github.com:NativeScript/nativescript-angular.git +$ cd nativescript-angular +``` + +### Install dependencies of the compatibility package (nativescript-angular) ``` $ cd nativescript-angular $ npm install ``` -### Run the sample application (ng-sample) +### Install dependencies of the scoped package (@nativescript/angular) + +``` +$ cd nativescript-angular-package +$ npm install +``` + +### Run some of the e2e applications e.g. router-tab-view Install NPM packages (use the local copy of `nativescript-angular`): ``` -$ cd ng-sample +$ cd e2e/router-tab-view $ npm install ``` @@ -43,6 +58,8 @@ $ tns run android $ tns run ios ``` +Make changes to `nativescript-angular` (in `./nativescript-angular-package` folder) or `@nativescript/angular` (in `./nativescript-angular` folder) and see them applied in the running app. + ## Running the tests Install the NPM dependencies (use the local copy of `nativescript-angular`): @@ -89,8 +106,20 @@ NOTE: The steps below describe how to run `renderer` tests, but the same approac ``` bash npm run e2e -- --runType capabilityName ``` + +## Building Packages -## Developer workflow +1. Build `@nativescript/angular` (a.k.a. "scoped package"): + ``` + cd nativescript-angular + npm install + npm run pack + ``` -1. Make changes to the `test`, `ng-sample` projects or in `nativescript-angular` folder. -2. Run the `tests` or `ng-sample` as shown above. +2. Build `nativescript-angular` (a.k.a. "compat-package"): + ``` + cd nativescript-angular-package + npm install + npm run pack-with-scoped-version -- ../dist/nativescript-angular-scoped.tgz + ``` +Packages are available in the `dist` folder. diff --git a/LICENSE b/LICENSE index ced13b45c..e519ff171 100755 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Apache License + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright (c) 2015-2018 Telerik AD + Copyright (c) 2020 nStudio, LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ Apache License distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/README.md b/README.md index 69ccc7a75..8819a1595 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +## Note on repo + +This repo is for Angular <= 11. If looking for 12+ (including 18+, etc) it's maintained here [NativeScript/angular](https://github.com/NativeScript/angular). + # NativeScript Angular [![Build Status](https://travis-ci.org/NativeScript/nativescript-angular.svg?branch=master)](https://travis-ci.org/NativeScript/nativescript-angular) @@ -8,11 +12,12 @@ This repository contains the code for integration of NativeScript with Angular. -- [Watch the video explaining Angular and NativeScript](#watch-the-video-explaining-angular-and-nativescript) -- [Explore the examples](#explore-the-examples) -- [Contribute](#contribute) -- [Known issues](#known-issues) -- [Get Help](#get-help) +- [NativeScript Angular](#nativescript-angular) + - [Watch the video explaining Angular and NativeScript](#watch-the-video-explaining-angular-and-nativescript) + - [Explore the examples](#explore-the-examples) + - [Contribute](#contribute) + - [Known issues](#known-issues) + - [Get Help](#get-help) @@ -22,10 +27,13 @@ This repository contains the code for integration of NativeScript with Angular. ## Explore the examples -The `ng-sample` app is meant for testing stuff while developing the renderer code, and isn't the best example out there. You can take a look at these sample apps that use the published builds from npm: +The `e2e` apps are meant for testing stuff. You can take a look at these additional sample apps that use the published builds from npm: -* [Hello world starter](https://github.com/NativeScript/template-hello-world-ng) -* [TodoMVC sample implementation](https://github.com/NativeScript/sample-ng-todomvc) +* [Hello world starter](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-hello-world-ng) +* [Master-detail template](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-master-detail-ng) +* [Drawer navigation template](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-drawer-navigation-ng) +* [TabView navigation template](https://github.com/NativeScript/nativescript-app-templates/tree/master/packages/template-tab-navigation-ng) +* [NativeScript Angular SDK examples](https://github.com/NativeScript/nativescript-sdk-examples-ng) ## Contribute We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md) and [development workflow for local setup](DevelopmentWorkflow.md). If you want to contribute, but you are not sure where to start - look for [issues labeled `help wanted`](https://github.com/NativeScript/nativescript-angular/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). @@ -36,6 +44,6 @@ We love PRs! Check out the [contributing guidelines](CONTRIBUTING.md) and [devel * Self-closing elements (`