Bootstrap Angular app.
This commit is contained in:
@ -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,
|
||||
|
@ -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', {
|
||||
|
27
src/app.module.ts
Normal file
27
src/app.module.ts
Normal file
@ -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);
|
@ -19,13 +19,14 @@
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<base href="/">
|
||||
|
||||
<!-- Title -->
|
||||
<title><% htmlWebpackPlugin.options.title %></title>
|
||||
</head>
|
||||
|
||||
<!-- htmllint attr-bans="false" -->
|
||||
<body style="padding-bottom: 50px; padding-top: 70px" ng-app="accountant">
|
||||
<body style="padding-bottom: 50px; padding-top: 70px">
|
||||
<!-- htmllint attr-bans="$previous" -->
|
||||
<!-- Navbar -->
|
||||
<nav class="navbar navbar-fixed-top navbar-inverse">
|
||||
|
@ -30,7 +30,7 @@ ngHttpAuth = 'http-auth-interceptor';
|
||||
var LoginService = require('./login.service');
|
||||
var LoginConfig = require('./login.config');
|
||||
|
||||
module.exports = angular.module('accountant.login', [
|
||||
export default angular.module('accountant.login', [
|
||||
ngHttpAuth,
|
||||
ngStorage
|
||||
])
|
||||
|
@ -28,7 +28,7 @@ var ScheduleConfig = require('./schedule.config');
|
||||
var ScheduleController = require('./schedule.controller');
|
||||
var ScheduleFactory = require('./schedule.factory');
|
||||
|
||||
module.exports = angular.module('accountant.scheduler', [
|
||||
export default angular.module('accountant.scheduler', [
|
||||
ngMessages,
|
||||
ngUiNotification,
|
||||
ngStrap
|
||||
|
Reference in New Issue
Block a user