以下代码
https://i.stack.imgur.com/07Jry.png
class BaseModel {
}
class BaseView<T: BaseModel> {
}
class BaseController<T: BaseView<BaseModel>> {
}
class MarketModel: BaseModel {
}
class InfoModel: BaseModel {
}
class MarketView: BaseView<MarketModel> {
}
class InfoView: BaseView<InfoModel> {
}
class MarketViewController: BaseController<MarketView> {
}
class InfoViewController: BaseController<InfoView> {
}
我收到了这样的错误消息
'BaseController'要求'MarketView'继承自'BaseView'
'BaseController'要求'InfoView'继承自'BaseView'
我该如何解决这个问题?
答案 0 :(得分:0)
我使用以下代码解决了这个错误:
console.log($filter('date')(new Date($scope.myDate),'yyyy-MM-dd'))