news.component.ts 1.2 KB

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