Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Step 3.9: Move PartiesList to imports
- Loading branch information
Kamil Kisiela
authored and
Dotan Simha
committed
Nov 22, 2016
1 parent
595bc9d
commit af8a289
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
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,27 @@ | ||
import angular from 'angular'; | ||
import angularMeteor from 'angular-meteor'; | ||
|
||
class PartiesList { | ||
constructor($scope, $reactive) { | ||
'ngInject'; | ||
|
||
$reactive(this).attach($scope); | ||
|
||
this.helpers({ | ||
parties() { | ||
return Parties.find({}); | ||
} | ||
}); | ||
} | ||
} | ||
|
||
const name = 'partiesList'; | ||
|
||
// create a module | ||
export default angular.module(name, [ | ||
angularMeteor | ||
]).component(name, { | ||
templateUrl: `imports/ui/components/${name}/${name}.html`, | ||
controllerAs: name, | ||
controller: PartiesList | ||
}); |