-
Notifications
You must be signed in to change notification settings - Fork 0
/
boot.ts
58 lines (48 loc) · 2.36 KB
/
boot.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/// <reference path='../../../typings/index.d.ts' />
// Import our Angular dependencies
import * as angular from 'angular';
import 'angular-animate';
import 'angular-aria';
import 'angular-material';
import 'angular-messages';
import 'angular-sanitize';
import 'react';
import 'react-dom';
import 'ngreact';
import {react2angular} from 'react2angular';
import {AppComponent} from '../components/start-app/start-app.component.ts';
import {UsersListComponent} from '../users/components/users-list/users-list.component.ts';
import {UserDetailsComponent} from '../users/components/user-details/user-details.component.ts';
import {SampleController} from '../controllers/sample.controller.ts';
import {Users} from '../users/users.ts';
import {MyReactComponentOne} from '../react/MyReactComponentOne.react.tsx';
import {MyReactComponentTwo} from '../react/MyReactComponentTwo.react.tsx';
module MaterialStart {
'use strict';
// Register our module and it's dependencies
angular.module('MaterialStart', ['ngMaterial', 'ngSanitize', 'react', Users.name])
.config(function ($mdIconProvider:angular.material.IIconProvider, $mdThemingProvider:angular.material.IThemingProvider) {
// Register the user `avatar` icons
$mdIconProvider
.defaultIconSet('./assets/svg/avatars.svg', 128)
.icon('menu', './assets/svg/menu.svg', 24)
.icon('share', './assets/svg/share.svg', 24)
.icon('google_plus', './assets/svg/google_plus.svg', 24)
.icon('hangouts', './assets/svg/hangouts.svg', 24)
.icon('twitter', './assets/svg/twitter.svg', 24)
.icon('phone', './assets/svg/phone.svg', 24);
$mdThemingProvider.theme('default')
.primaryPalette('brown')
.accentPalette('red');
})
// Register all of our components
.component(AppComponent.componentName, AppComponent.componentConfig)
.component(UsersListComponent.componentName, UsersListComponent.componentConfig)
.component(UserDetailsComponent.componentName, UserDetailsComponent.componentConfig)
.controller('SampleController', SampleController)
// #### sample one #### using an angular 1.5+ component type
.component('myReactComponentOne', react2angular(MyReactComponentOne, ['foo', 'bar', 'person'], ['$http']))
// #### sample two #### using a directive for further backwards compatibility
.value('MyReactComponentTwo', MyReactComponentTwo);
;
}