Skip to content

Commit

Permalink
Step 23.6: Default imports of components
Browse files Browse the repository at this point in the history
  • Loading branch information
Kamil Kisiela authored and Dotan Simha committed Nov 22, 2016
1 parent ea8b462 commit 1477438
Showing 1 changed file with 21 additions and 16 deletions.
37 changes: 21 additions & 16 deletions imports/ui/components/socially/socially.ts
Expand Up @@ -11,35 +11,40 @@ import { Meteor } from 'meteor/meteor';

import webTemplate from './web.html';
import mobileTemplate from './mobile.html';
import { name as PartiesList } from '../partiesList/partiesList';
import { name as PartyDetails } from '../partyDetails/partyDetails';
import { name as Navigation } from '../navigation/navigation';
import { name as Auth } from '../auth/auth';
import { PartiesListNg1Module } from '../partiesList/partiesList';
import { PartyDetailsNg1Module } from '../partyDetails/partyDetails';
import { NavigationNg1Module } from '../navigation/navigation';
import { AuthNg1Module } from '../auth/auth';

class Socially {}

const name = 'socially';
const template = Meteor.isCordova ? mobileTemplate : webTemplate;

// create a module
export default angular.module(name, [
export const SociallyNg1Module = angular.module(name, [
angularMeteor,
ngMaterial,
ngSanitize,
uiRouter,
PartiesList,
PartyDetails,
Navigation,
Auth,
PartiesListNg1Module.name,
PartyDetailsNg1Module.name,
NavigationNg1Module.name,
AuthNg1Module.name,
'accounts.ui',
'ionic'
]).component(name, {
template,
controllerAs: name,
controller: Socially
})
.config(config)
.run(run);
]);

export function registerSocially() {
SociallyNg1Module
.component(name, {
template,
controllerAs: name,
controller: Socially
})
.config(config)
.run(run);
}

function config($locationProvider, $urlRouterProvider, $mdIconProvider) {
'ngInject';
Expand Down

0 comments on commit 1477438

Please sign in to comment.