Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 23.7: Move everything to typescript
- Loading branch information
Showing
49 changed files
with
431 additions
and
339 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import * as angular from 'angular'; | ||
import * as angularMeteor from 'angular-meteor'; | ||
|
||
import { Meteor } from 'meteor/meteor'; | ||
import { Accounts } from 'meteor/accounts-base'; | ||
|
||
import template from './auth.html'; | ||
import DisplayNameFilter from '../../filters/displayNameFilter'; | ||
import { LoginNg1Module } from '../login/login'; | ||
import { RegisterNg1Module } from '../register/register'; | ||
import { PasswordNg1Module } from '../password/password'; | ||
|
||
const name = 'auth'; | ||
|
||
class Auth { | ||
constructor($scope, $reactive) { | ||
'ngInject'; | ||
|
||
$reactive(this).attach($scope); | ||
|
||
this.helpers({ | ||
isLoggedIn() { | ||
return !!Meteor.userId(); | ||
}, | ||
currentUser() { | ||
return Meteor.user(); | ||
} | ||
}); | ||
} | ||
|
||
logout() { | ||
Accounts.logout(); | ||
} | ||
} | ||
|
||
// create a module | ||
export const AuthNg1Module = angular.module(name, [ | ||
angularMeteor, | ||
DisplayNameFilter.name, | ||
LoginNg1Module.name, | ||
RegisterNg1Module.name, | ||
PasswordNg1Module.name | ||
]); | ||
|
||
export function registerAuth() { | ||
AuthNg1Module | ||
.component(name, { | ||
template, | ||
controllerAs: name, | ||
controller: Auth | ||
}); | ||
} |
30 changes: 17 additions & 13 deletions
30
imports/ui/components/login/login.js → imports/ui/components/login/login.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as angular from 'angular'; | ||
import * as angularMeteor from 'angular-meteor'; | ||
|
||
import template from './navigation.html'; | ||
|
||
const name = 'navigation'; | ||
|
||
// create a module | ||
export const NavigationNg1Module = angular.module(name, [ | ||
angularMeteor | ||
]); | ||
|
||
export function registerNavigation() { | ||
NavigationNg1Module | ||
.component(name, { | ||
template, | ||
controllerAs: name | ||
}); | ||
} |
6 changes: 3 additions & 3 deletions
6
...s/partiesList/client/partiesList.tests.js → ...s/partiesList/client/partiesList.tests.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.