25 lines
536 B
JavaScript
25 lines
536 B
JavaScript
import ngModule from '../../module';
|
|
import Component from 'core/lib/component';
|
|
|
|
class Controller extends Component {
|
|
set role(value) {
|
|
this._role = value;
|
|
this.$.summary = null;
|
|
if (!value) return;
|
|
this.$http.get(`VnRoles/${value.id}`)
|
|
.then(res => this.$.summary = res.data);
|
|
}
|
|
|
|
get role() {
|
|
return this._role;
|
|
}
|
|
}
|
|
|
|
ngModule.component('vnRoleSummary', {
|
|
template: require('./index.html'),
|
|
controller: Controller,
|
|
bindings: {
|
|
role: '<'
|
|
}
|
|
});
|