如果两个服务在Angular 2应用程序中相互交互,是否可以接受?

时间:2018-01-25 17:47:42

标签: javascript angular typescript service structure

我有两项服务,例如:

房间服务

template <>
class Vector<1> {
  float n;
 public:
  operator float& () { return n; }
}

EventService

import { Injectable } from '@angular/core';
import { Room } from './room.model';

@Injectable()
export class RoomService {
  ...
  getRoom(): Room {
    return room;
  }
  ...
}

在EventService中使用RoomService是否合乎逻辑?

0 个答案:

没有答案