diff --git a/package.json b/package.json index ce156e2..bac6db0 100644 --- a/package.json +++ b/package.json @@ -29,11 +29,20 @@ "less-loader": "^4.0.4", "ngtemplate-loader": "^2.0.0", "style-loader": "^0.18.2", + "ts-loader": "^2.2.2", + "typescript": "^2.4.1", "url-loader": "^0.5.8", "webpack": "^3.1.0", "webpack-dev-server": "^2.5.1" }, "dependencies": { + "@angular/common": "^4.2.6", + "@angular/compiler": "^4.2.6", + "@angular/core": "^4.2.6", + "@angular/platform-browser": "^4.2.6", + "@angular/platform-browser-dynamic": "^4.2.6", + "@angular/upgrade": "^4.2.6", + "@types/node": "^8.0.10", "angular": "^1.6", "angular-http-auth": "^1.5", "angular-messages": "^1.6", @@ -49,7 +58,10 @@ "font-awesome": "^4.7.0", "jquery": "^3.2", "meanie-angular-storage": "^1.3.1", - "moment": "^2.18" + "moment": "^2.18", + "reflect-metadata": "^0.1.10", + "rxjs": "^5.4.2", + "zone.js": "^0.8.12" }, "scripts": { "build": "webpack --config webpack.config.js", diff --git a/src/accounts/index.ts b/src/accounts/index.ts index bab9a69..b00f3ae 100644 --- a/src/accounts/index.ts +++ b/src/accounts/index.ts @@ -30,7 +30,7 @@ var AccountBalancesFactory = require('./accountBalances.factory'); var AccountConfig = require('./account.config'); var AccountController = require('./account.controller'); -module.exports = angular.module('accountant.accounts', [ +export default angular.module('accountant.accounts', [ ngResource, ngMessages, ngUiNotification, diff --git a/src/app.config.ts b/src/app.config.ts index b3400dd..9ca2867 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -2,7 +2,7 @@ var operationsTmpl = require('./operations/operations.html'); var accountsTmpl = require('./accounts/accounts.html'); var schedulerTmpl = require('./scheduler/scheduler.html'); -module.exports = function($routeProvider) { +export default function AppConfig($routeProvider) { // Defining template and controller in function of route. $routeProvider .when('/account/:accountId/operations', { diff --git a/src/app.module.ts b/src/app.module.ts new file mode 100644 index 0000000..d0202af --- /dev/null +++ b/src/app.module.ts @@ -0,0 +1,27 @@ +// vim: set tw=80 ts=2 sw=2 sts=2: +import 'zone.js'; +import 'reflect-metadata'; + +import './app.ts'; + +import { NgModule } from '@angular/core'; +import { BrowserModule } from '@angular/platform-browser'; +import { UpgradeModule } from '@angular/upgrade/static'; +import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; + +@NgModule({ + imports: [ + BrowserModule, + UpgradeModule + ] +}) + +export class AppModule { + constructor(private upgrade: UpgradeModule) { } + + ngDoBootstrap() { + this.upgrade.bootstrap(document.body, ['accountant'], { strictDi: false }); + } +} + +platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/src/index.ejs b/src/index.ejs index 888c8b5..71e1d8d 100644 --- a/src/index.ejs +++ b/src/index.ejs @@ -19,13 +19,14 @@
+