using decorators to write AngularJS in nearly identical syntax to Angular 2
This commit is contained in:
parent
8e863b8cf5
commit
c60ce4a696
19 changed files with 559 additions and 488 deletions
|
@ -1,12 +1,28 @@
|
|||
import * as angular from 'angular';
|
||||
import { rpHeaderDirective, rpBodyDirective, rpSidebarDirective } from './directives/components/pages/repo-page/main';
|
||||
import pages from './constants/pages.constant';
|
||||
import { PageServiceImpl } from './services/page/page.service.impl';
|
||||
import { NgModule } from 'angular-ts-decorators';
|
||||
|
||||
|
||||
export default angular
|
||||
.module('quayPages', [])
|
||||
.constant('pages', pages)
|
||||
/**
|
||||
* Module containing registered application page/view components.
|
||||
*/
|
||||
@NgModule({
|
||||
imports: [],
|
||||
declarations: [],
|
||||
providers: [
|
||||
PageServiceImpl,
|
||||
]
|
||||
})
|
||||
export class quayPages {
|
||||
|
||||
}
|
||||
|
||||
|
||||
// TODO: Move component registration to @NgModule and remove this.
|
||||
angular
|
||||
.module(quayPages.name)
|
||||
.constant('pages', new PageServiceImpl())
|
||||
.directive('rpHeader', rpHeaderDirective)
|
||||
.directive('rpSidebar', rpSidebarDirective)
|
||||
.directive('rpBody', rpBodyDirective)
|
||||
.name;
|
||||
.directive('rpBody', rpBodyDirective);
|
||||
|
|
Reference in a new issue