Created
November 15, 2016 09:15
-
-
Save malikperang/ce4967518dc2d049ff3d249272a7adf4 to your computer and use it in GitHub Desktop.
lecturer dashboard
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
import angular from 'angular'; | |
import angularMeteor from 'angular-meteor'; | |
import uiRouter from 'angular-ui-router'; | |
import 'chart.js/dist/Chart.js'; | |
import 'angular-chart.js/dist/angular-chart.js'; | |
import { Meteor } from 'meteor/meteor'; | |
import { Transactions } from '../../../api/transactions.js'; | |
import { countTotalStudent } from '../../../api/aggregations.js'; | |
import template from './lecturerdashboard.html'; | |
class LecturerDashboard{ | |
constructor($scope,$state,$log,$reactive){ | |
'ngInject'; | |
$reactive(this).attach($scope); | |
this.subscribe('countTotalStudent'); | |
var totalStudents = countTotalStudent.find(); | |
this.helpers({ | |
test(){ | |
console.log(totalStudents.fetch()); | |
} | |
}); | |
} | |
const name = 'lecturerdashboard'; | |
export default angular.module(name, [angularMeteor, uiRouter,'chart.js']) | |
.component(name, { | |
template, | |
controllerAs: name, | |
controller: LecturerDashboard | |
}) | |
.config(config); | |
function config($stateProvider) { | |
'ngInject'; | |
$stateProvider | |
.state('lecturerdashboard', { | |
url: '/lecturerdashboard', | |
template: '<lecturerdashboard></lecturerdashboard>' | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment