angular-cn/public/docs/_examples/cb-dependency-injection/ts/app/user.service.ts

11 lines
190 B
TypeScript

// #docregion
import { Injectable } from '@angular/core';
@Injectable()
export class UserService {
getUserById(userId: number): any {
return {name: 'Bombasto', role: 'Admin'};
}
}