import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-news', templateUrl: './news.component.html', styleUrls: ['./news.component.scss'], }) export class NewsComponent implements OnInit { newsList = [ { title: '中央军委举行晋升上将军衔仪式 习近平颁发命令状并向晋衔的军官表示祝贺', summary: '中央军委晋升上将军衔仪式9日在北京八一大楼举行。中央军委主席习近平出席晋衔仪式。', image: 'assets/images/new1.jpg', date: new Date(), }, { title: '洞庭湖全线退出警戒水位', summary: '记者获悉,7月10日6时,洞庭湖流域最后一个超警水文站点——岳阳站水位退至警戒水位32.5米以下并继续回落,标志着洞庭湖流域全线整体退出警戒水位', image: 'assets/images/new2.jpg', date: new Date(), }, { title: '高考后的心理创伤如何疗愈', summary: '“高考考砸了,我的人生是不是没有必要继续了?”', image: 'assets/images/new3.jpg', date: new Date(), }, // Add more news items as needed ]; constructor() {} ngOnInit() {} }