Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
4cf2a1c
Remove router-deprecated, lowercase animation example files.
hdeshev Aug 15, 2016
657e6cc
Temporary compile-only fix for animation code.
hdeshev Aug 15, 2016
e4a10aa
Switch to Angular 2 rc5 dependencies
hdeshev Aug 15, 2016
26545be
Define a NgModule and platform
hdeshev Aug 15, 2016
b1d427f
Migrate value accessors to new @angular/forms module
hdeshev Aug 15, 2016
ed46d65
Update ng-sample with a RendererTest NgModule
hdeshev Aug 15, 2016
3720541
Add forms module. Throw in an empty router module too.
hdeshev Aug 16, 2016
e20fe8c
RouterModule now with providers. Default router-outlet example.
hdeshev Aug 16, 2016
a735506
Fix PageRouterOutlet for rc5. Get first example running.
hdeshev Aug 16, 2016
a032115
Port the rest of the router examples to rc5.
hdeshev Aug 16, 2016
ff5b703
Fix animation for rc5. Port animation examples too.
hdeshev Aug 16, 2016
4f5e281
Fix ActionBarTest example for rc5
hdeshev Aug 17, 2016
8df4ef5
Update livesync (CSS/templates) for rc5
hdeshev Aug 17, 2016
6032993
Allow advanced platform bootstraps via AppOptions.
hdeshev Aug 17, 2016
cbf3279
Change tests dependencies to rc5
hdeshev Aug 17, 2016
ba3f250
Boot multiple apps in `tests` using rc5 modules.
hdeshev Aug 17, 2016
66b9a55
Fix karma tests for rc5.
hdeshev Aug 18, 2016
e9a442e
Delete nativescript-angular/application module.
hdeshev Aug 18, 2016
fded5f4
Use `tns install` in .travis.yml
hdeshev Aug 19, 2016
86511b3
Update changelog for rc5
hdeshev Aug 19, 2016
55bee82
Version bump: 0.4.0
hdeshev Aug 29, 2016
4fa1649
Disable Karma tests on Travis
hdeshev Aug 29, 2016
7dd4b0e
Fix Appium tests by tweaking timeouts.
hdeshev Aug 29, 2016
4812bca
chore: cleanup and proper ng-sample package
NathanWalker Aug 28, 2016
f4d9d32
chore: update iOS resources to latest
NathanWalker Aug 28, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
env:
global:
- NODE_VERSION=4.4.7
- NODE_VERSION=6.4.0
- DATE=$(date +%Y-%m-%d)
- PACKAGE_VERSION=$DATE-$TRAVIS_BUILD_NUMBER

Expand All @@ -22,7 +22,7 @@ before_cache:

cache:
directories:
- .nvm
- $HOME/.nvm
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

Expand All @@ -36,18 +36,19 @@ install:
- npm install
- npm link
- cd ../tests
- tns install
- npm link nativescript-angular
- npm install

before_script:
- echo no | android create avd --force -n test -t android-19 -b armeabi-v7a
- emulator -avd test -no-audio -no-window &
- android-wait-for-emulator
- emulator -memory 1024 -avd test -no-audio -no-window &

script:
- tns platform add android
- tns test android --emulator --justlaunch
- npm run appium-android
- # DISABLE KARMA TESTS - hanging the build on Travis
- # tns test android --emulator --justlaunch
- tns build android
- android-wait-for-emulator
- npm run run-appium-android

before_deploy:
- cd ../nativescript-angular
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.4.0 (2016-08-19)

- Migrate to Angular 2 RC5.
- Bootstrapping apps using NgModule's. The old `nativescriptBootstrap` method is gone, and apps should switch to the `platformNativeScriptDynamic().bootstrapModule(MyAppModule)` API
- The library entrypoint is now the `nativescript-angular/platform` module. Import `NativeScriptRouterModule` from `nativescript-angular/router` and `NativeScriptFormsModule` from `nativescript-angular/forms` respectively if you want to use routing and form value accessor directives.

# 0.1.8 (2016-06-22)

- Migrate to Migrate to Angular RC3 and Angular Router 3.0.0-alpha.7:
Expand Down Expand Up @@ -34,4 +40,4 @@
- `nativescript-angular/router` -> `nativescript-angular/router-deprecated`
- `nativescript-angular/router/ns-router` -> `nativescript-angular/router-deprecated/ns-router-deprecated`

- Build requires globally installed **typings** (`npm install -g typings`)
- Build requires globally installed **typings** (`npm install -g typings`)
2 changes: 1 addition & 1 deletion nativescript-angular/animation-driver.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AnimationKeyframe } from '@angular/core/src/animation/animation_keyframe';
import { AnimationPlayer } from '@angular/core/src/animation/animation_player';
import { AnimationStyles } from '@angular/core/src/animation/animation_styles';
import { AnimationDriver } from '@angular/core/src/animation/animation_driver';
import { AnimationDriver } from '@angular/platform-browser/src/dom/animation_driver';
import { NativeScriptAnimationPlayer } from './animation-player';
import {View} from "ui/core/view";
import styleProperty = require('ui/styling/style-property');
Expand Down
11 changes: 11 additions & 0 deletions nativescript-angular/animation-player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class NativeScriptAnimationPlayer implements AnimationPlayer {

private _subscriptions: Function[] = [];
private _finished = false;
private _started = false;
private animation: KeyframeAnimation;
private target: View;

Expand Down Expand Up @@ -63,18 +64,28 @@ export class NativeScriptAnimationPlayer implements AnimationPlayer {
this.animation = KeyframeAnimation.keyframeAnimationFromInfo(keyframeAnimationInfo, observable.ValueSource.VisualState);
}

init(): void {
}

hasStarted(): boolean {
return this._started;
}


onDone(fn: Function): void { this._subscriptions.push(fn); }

private _onFinish() {
if (!this._finished) {
this._finished = true;
this._started = false;
this._subscriptions.forEach(fn => fn());
this._subscriptions = [];
}
}

play(): void {
if (this.animation) {
this._started = true;
this.animation.play(this.target)
.then(() => { this._onFinish(); })
.catch((e) => { });
Expand Down
209 changes: 0 additions & 209 deletions nativescript-angular/application.ts

This file was deleted.

13 changes: 1 addition & 12 deletions nativescript-angular/directives.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import {Type} from '@angular/core/src/facade/lang';
import {ListViewComponent, SetupItemViewArgs} from './directives/list-view-comp';
import {TextValueAccessor} from './value-accessors/text-value-accessor';
import {CheckedValueAccessor} from './value-accessors/checked-value-accessor';
import {DateValueAccessor} from './value-accessors/date-value-accessor';
import {TimeValueAccessor} from './value-accessors/time-value-accessor';
import {NumberValueAccessor} from './value-accessors/number-value-accessor';
import {SelectedIndexValueAccessor} from './value-accessors/selectedIndex-value-accessor';
import {TabViewDirective, TabViewItemDirective} from './directives/tab-view';
import {ActionBarComponent, ActionBarScope, ActionItemDirective, NavigationButtonDirective} from './directives/action-bar';
import {AndroidFilterComponent, IosFilterComponent} from './directives/platform-filters';


export const NS_DIRECTIVES: Type[] = [
ListViewComponent,
TabViewDirective,
TabViewItemDirective,
TextValueAccessor,
CheckedValueAccessor,
DateValueAccessor,
TimeValueAccessor,
SelectedIndexValueAccessor,
NumberValueAccessor,
ActionBarComponent,
ActionBarScope,
ActionItemDirective,
Expand Down
4 changes: 4 additions & 0 deletions nativescript-angular/dom-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ export class NativeScriptElementSchemaRegistry extends ElementSchemaRegistry {
return propName;
}

getDefaultComponentElementName(): string {
return 'ng-component';
}

securityContext(tagName: string, propName: string): any {
return SecurityContext.NONE;
}
Expand Down
33 changes: 33 additions & 0 deletions nativescript-angular/forms.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { Type } from '@angular/core/src/facade/lang';
import { NgModule } from "@angular/core";
import { FormsModule } from "@angular/forms";
import { TextValueAccessor } from './value-accessors/text-value-accessor';
import { CheckedValueAccessor } from './value-accessors/checked-value-accessor';
import { DateValueAccessor } from './value-accessors/date-value-accessor';
import { TimeValueAccessor } from './value-accessors/time-value-accessor';
import { NumberValueAccessor } from './value-accessors/number-value-accessor';
import { SelectedIndexValueAccessor } from './value-accessors/selectedIndex-value-accessor';

export const FORMS_DIRECTIVES: Type[] = [
TextValueAccessor,
CheckedValueAccessor,
DateValueAccessor,
TimeValueAccessor,
SelectedIndexValueAccessor,
NumberValueAccessor,
];

@NgModule({
declarations: FORMS_DIRECTIVES,
providers: [
],
imports: [
FormsModule
],
exports: [
FormsModule,
FORMS_DIRECTIVES,
]
})
export class NativeScriptFormsModule {
}
2 changes: 1 addition & 1 deletion nativescript-angular/hooks/hook-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ exports.getBeforeLivesyncHookDir = function getBeforeLivesyncHookDir() {
};

exports.getHookFilePath = function getHookFilePath() {
return path.join(exports.getBeforeLivesyncHookDir(), "nativescript-angular-sync .js");
return path.join(exports.getBeforeLivesyncHookDir(), "nativescript-angular-sync.js");
};
Loading