Skip to content

Commit

Permalink
Merge pull request #67 from DimitarTodorov/master
Browse files Browse the repository at this point in the history
fix: various AoT errors
  • Loading branch information
triniwiz authored Aug 30, 2018
2 parents 7cbd33b + fc8d117 commit 3bd347e
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 14 deletions.
4 changes: 1 addition & 3 deletions demo-ng/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { LoginComponent } from './login/login.component';
import { MainPageComponent } from './main-page/main-page.component';

import { SocketIOModule } from 'nativescript-socketio/angular';
import { isAndroid } from 'tns-core-modules/platform/platform';
import { server } from './environment';
import { TimeFromNow } from './timeFromNow.pipe';

// Uncomment and add to NgModule imports if you need to use two-way binding
Expand All @@ -16,8 +16,6 @@ import { TimeFromNow } from './timeFromNow.pipe';
// Uncomment and add to NgModule imports if you need to use the HTTP wrapper
// import { NativeScriptHttpModule } from "nativescript-angular/http";

const server = isAndroid ? 'http://10.0.2.2:3001?test=123&platform=android' : 'http://localhost:3001?test=123&platform=ios';

@NgModule({
bootstrap: [
AppComponent
Expand Down
1 change: 1 addition & 0 deletions demo-ng/app/environment.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const server = 'http://10.0.2.2:3001?test=123&platform=android';
1 change: 1 addition & 0 deletions demo-ng/app/environment.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const server: string;
1 change: 1 addition & 0 deletions demo-ng/app/environment.ios.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const server = 'http://localhost:3001?test=123&platform=ios';
2 changes: 1 addition & 1 deletion demo-ng/app/main-page/main-page.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
</ActionBar>

<GridLayout columns="2*,*" rows="auto,auto, *" class="page">
<Button colSpan="2" width="50%" height="44" text="Log Out" (tap)="logout($event)" borderWidth="1" borderRadius="8" borderColor="black" textAlignment="center" horizontalAlignment="center"></Button>
<Button colSpan="2" width="50%" height="44" text="Log Out" (tap)="logout()" borderWidth="1" borderRadius="8" borderColor="black" textAlignment="center" horizontalAlignment="center"></Button>
<TextField #messageEl hint="Enter text" row="1"></TextField>
<Button col="1" text="Add" (tap)="sendText(messageEl.text)" row="1"></Button>

Expand Down
6 changes: 0 additions & 6 deletions demo-ng/app/main.aot.ts

This file was deleted.

4 changes: 2 additions & 2 deletions demo-ng/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
},
"devDependencies": {
"@angular/compiler-cli": "~6.1.0",
"@ngtools/webpack": "~6.1.0",
"@ngtools/webpack": "~6.2.0-rc.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"lazy": "1.0.11",
"nativescript-dev-sass": "^1.6.0",
"nativescript-dev-typescript": "^0.5.0",
"nativescript-dev-webpack": "^0.15.1",
"nativescript-dev-webpack": "rc",
"typescript": "~2.8.2",
"tslint": "~5.4.3"
},
Expand Down
1 change: 0 additions & 1 deletion demo-ng/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"node_modules",
"../src/node_modules",
"platforms",
"**/*.aot.ts",
"**/*.spec.ts"
]
}
7 changes: 7 additions & 0 deletions demo-ng/tsconfig.tns.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "./tsconfig",
"compilerOptions": {
"module": "es2015",
"moduleResolution": "node"
}
}
2 changes: 1 addition & 1 deletion src/angular/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type SocketIOOptions = Partial<IOOptions>;
export const SOCKETIO_URL = new InjectionToken<string>('SOCKETIO_URL');
export const SOCKETIO_OPTIONS = new InjectionToken<SocketIOOptions>('SOCKETIO_OPTIONS');

function socketIOFactory(url: string, options: SocketIOOptions) {
export function socketIOFactory(url: string, options: SocketIOOptions) {
return new SocketIO(url, options);
}

Expand Down

0 comments on commit 3bd347e

Please sign in to comment.