You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

630 lines
14 KiB

3 years ago
  1. export const USERS = {
  2. 1: {
  3. id: 1,
  4. email: 'test@angular-university.io',
  5. password: 'test'
  6. }
  7. };
  8. export const COURSES: any = {
  9. 4: {
  10. id: 4,
  11. description: 'NgRx (with NgRx Data) - The Complete Guide',
  12. longDescription: 'Learn the modern Ngrx Ecosystem, including NgRx Data, Store, Effects, Router Store, Ngrx Entity, and Dev Tools.',
  13. iconUrl: 'https://angular-university.s3-us-west-1.amazonaws.com/course-images/ngrx-v2.png',
  14. category: 'BEGINNER',
  15. lessonsCount: 10,
  16. seqNo: 0,
  17. url: 'ngrx-course'
  18. },
  19. 2: {
  20. id: 2,
  21. description: 'Angular Core Deep Dive',
  22. longDescription: 'A detailed walk-through of the most important part of Angular - the Core and Common modules',
  23. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-core-in-depth-small.png',
  24. lessonsCount: 10,
  25. category: 'BEGINNER',
  26. seqNo: 1,
  27. url: 'angular-core-course'
  28. },
  29. 3: {
  30. id: 3,
  31. description: 'RxJs In Practice Course',
  32. longDescription: 'Understand the RxJs Observable pattern, learn the RxJs Operators via practical examples',
  33. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/rxjs-in-practice-course.png',
  34. category: 'BEGINNER',
  35. lessonsCount: 10,
  36. seqNo: 2,
  37. url: 'rxjs-course'
  38. },
  39. 1: {
  40. id: 1,
  41. description: 'Serverless Angular with Firebase Course',
  42. longDescription: 'Serveless Angular with Firestore, Firebase Storage & Hosting, Firebase Cloud Functions & AngularFire',
  43. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/serverless-angular-small.png',
  44. lessonsCount: 10,
  45. category: 'BEGINNER',
  46. seqNo: 4,
  47. url: 'serverless-angular'
  48. },
  49. /*
  50. 5: {
  51. id: 5,
  52. description: 'Angular for Beginners',
  53. longDescription: "Establish a solid layer of fundamentals, learn what's under the hood of Angular",
  54. iconUrl: 'https://angular-academy.s3.amazonaws.com/thumbnails/angular2-for-beginners-small-v2.png',
  55. category: 'BEGINNER',
  56. lessonsCount: 10,
  57. seqNo: 5,
  58. url: 'angular-for-beginners'
  59. },
  60. */
  61. 12: {
  62. id: 12,
  63. description: 'Angular Testing Course',
  64. longDescription: 'In-depth guide to Unit Testing and E2E Testing of Angular Applications',
  65. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-testing-small.png',
  66. category: 'BEGINNER',
  67. seqNo: 6,
  68. url: 'angular-testing-course',
  69. lessonsCount: 10,
  70. },
  71. 6: {
  72. id: 6,
  73. description: 'Angular Security Course - Web Security Fundamentals',
  74. longDescription: 'Learn Web Security Fundamentals and apply them to defend an Angular / Node Application from multiple types of attacks.',
  75. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/security-cover-small-v2.png',
  76. category: 'ADVANCED',
  77. lessonsCount: 11,
  78. seqNo: 7,
  79. url: 'angular-security-course'
  80. },
  81. 7: {
  82. id: 7,
  83. description: 'Angular PWA - Progressive Web Apps Course',
  84. longDescription: 'Learn Angular Progressive Web Applications, build the future of the Web Today.',
  85. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/angular-pwa-course.png',
  86. category: 'ADVANCED',
  87. lessonsCount: 8,
  88. seqNo: 8,
  89. url: 'angular-pwa-course'
  90. },
  91. 8: {
  92. id: 8,
  93. description: 'Angular Advanced Library Laboratory: Build Your Own Library',
  94. longDescription: 'Learn Advanced Angular functionality typically used in Library Development. Advanced Components, Directives, Testing, Npm',
  95. iconUrl: 'https://angular-academy.s3.amazonaws.com/thumbnails/advanced_angular-small-v3.png',
  96. category: 'ADVANCED',
  97. seqNo: 9,
  98. url: 'angular-advanced-course'
  99. },
  100. 9: {
  101. id: 9,
  102. description: 'The Complete Typescript Course',
  103. longDescription: 'Complete Guide to Typescript From Scratch: Learn the language in-depth and use it to build a Node REST API.',
  104. iconUrl: 'https://angular-academy.s3.amazonaws.com/thumbnails/typescript-2-small.png',
  105. category: 'BEGINNER',
  106. seqNo: 10,
  107. url: 'typescript-course'
  108. },
  109. 10: {
  110. id: 10,
  111. description: 'Rxjs and Reactive Patterns Angular Architecture Course',
  112. longDescription: 'Learn the core RxJs Observable Pattern as well and many other Design Patterns for building Reactive Angular Applications.',
  113. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-academy/blog/images/rxjs-reactive-patterns-small.png',
  114. category: 'BEGINNER',
  115. seqNo: 11,
  116. url: 'rxjs-patterns-course'
  117. },
  118. 11: {
  119. id: 11,
  120. description: 'Angular Material Course',
  121. longDescription: 'Build Applications with the official Angular Widget Library',
  122. iconUrl: 'https://s3-us-west-1.amazonaws.com/angular-university/course-images/material_design.png',
  123. category: 'BEGINNER',
  124. seqNo: 12,
  125. url: 'angular-material-course'
  126. }
  127. };
  128. export const LESSONS = {
  129. 1: {
  130. id: 1,
  131. 'description': 'Angular Tutorial For Beginners - Build Your First App - Hello World Step By Step',
  132. 'duration': '4:17',
  133. 'seqNo': 1,
  134. courseId: 5
  135. },
  136. 2: {
  137. id: 2,
  138. 'description': 'Building Your First Component - Component Composition',
  139. 'duration': '2:07',
  140. 'seqNo': 2,
  141. courseId: 5
  142. },
  143. 3: {
  144. id: 3,
  145. 'description': 'Component @Input - How To Pass Input Data To an Component',
  146. 'duration': '2:33',
  147. 'seqNo': 3,
  148. courseId: 5
  149. },
  150. 4: {
  151. id: 4,
  152. 'description': ' Component Events - Using @Output to create custom events',
  153. 'duration': '4:44',
  154. 'seqNo': 4,
  155. courseId: 5
  156. },
  157. 5: {
  158. id: 5,
  159. 'description': ' Component Templates - Inline Vs External',
  160. 'duration': '2:55',
  161. 'seqNo': 5,
  162. courseId: 5
  163. },
  164. 6: {
  165. id: 6,
  166. 'description': 'Styling Components - Learn About Component Style Isolation',
  167. 'duration': '3:27',
  168. 'seqNo': 6,
  169. courseId: 5
  170. },
  171. 7: {
  172. id: 7,
  173. 'description': ' Component Interaction - Extended Components Example',
  174. 'duration': '9:22',
  175. 'seqNo': 7,
  176. courseId: 5
  177. },
  178. 8: {
  179. id: 8,
  180. 'description': ' Components Tutorial For Beginners - Components Exercise !',
  181. 'duration': '1:26',
  182. 'seqNo': 8,
  183. courseId: 5
  184. },
  185. 9: {
  186. id: 9,
  187. 'description': ' Components Tutorial For Beginners - Components Exercise Solution Inside',
  188. 'duration': '2:08',
  189. 'seqNo': 9,
  190. courseId: 5
  191. },
  192. 10: {
  193. id: 10,
  194. 'description': ' Directives - Inputs, Output Event Emitters and How To Export Template References',
  195. 'duration': '4:01',
  196. 'seqNo': 10,
  197. courseId: 5
  198. },
  199. // Security Course
  200. 11: {
  201. id: 11,
  202. 'description': 'Course Helicopter View',
  203. 'duration': '08:19',
  204. 'seqNo': 1,
  205. courseId: 6
  206. },
  207. 12: {
  208. id: 12,
  209. 'description': 'Installing Git, Node, NPM and Choosing an IDE',
  210. 'duration': '04:17',
  211. 'seqNo': 2,
  212. courseId: 6
  213. },
  214. 13: {
  215. id: 13,
  216. 'description': 'Installing The Lessons Code - Learn Why Its Essential To Use NPM 5',
  217. 'duration': '06:05',
  218. 'seqNo': 3,
  219. courseId: 6
  220. },
  221. 14: {
  222. id: 14,
  223. 'description': 'How To Run Node In TypeScript With Hot Reloading',
  224. 'duration': '03:57',
  225. 'seqNo': 4,
  226. courseId: 6
  227. },
  228. 15: {
  229. id: 15,
  230. 'description': 'Guided Tour Of The Sample Application',
  231. 'duration': '06:00',
  232. 'seqNo': 5,
  233. courseId: 6
  234. },
  235. 16: {
  236. id: 16,
  237. 'description': 'Client Side Authentication Service - API Design',
  238. 'duration': '04:53',
  239. 'seqNo': 6,
  240. courseId: 6
  241. },
  242. 17: {
  243. id: 17,
  244. 'description': 'Client Authentication Service - Design and Implementation',
  245. 'duration': '09:14',
  246. 'seqNo': 7,
  247. courseId: 6
  248. },
  249. 18: {
  250. id: 18,
  251. 'description': 'The New Angular HTTP Client - Doing a POST Call To The Server',
  252. 'duration': '06:08',
  253. 'seqNo': 8,
  254. courseId: 6
  255. },
  256. 19: {
  257. id: 19,
  258. 'description': 'User Sign Up Server-Side Implementation in Express',
  259. 'duration': '08:50',
  260. 'seqNo': 9,
  261. courseId: 6
  262. },
  263. 20: {
  264. id: 20,
  265. 'description': 'Introduction To Cryptographic Hashes - A Running Demo',
  266. 'duration': '05:46',
  267. 'seqNo': 10,
  268. courseId: 6
  269. },
  270. 21: {
  271. id: 21,
  272. 'description': 'Some Interesting Properties Of Hashing Functions - Validating Passwords',
  273. 'duration': '06:31',
  274. 'seqNo': 11,
  275. courseId: 6
  276. },
  277. // PWA course
  278. 22: {
  279. id: 22,
  280. 'description': 'Course Kick-Off - Install Node, NPM, IDE And Service Workers Section Code',
  281. 'duration': '07:19',
  282. 'seqNo': 1,
  283. courseId: 7
  284. },
  285. 23: {
  286. id: 23,
  287. 'description': 'Service Workers In a Nutshell - Service Worker Registration',
  288. 'duration': '6:59',
  289. 'seqNo': 2,
  290. courseId: 7
  291. },
  292. 24: {
  293. id: 24,
  294. 'description': 'Service Workers Hello World - Lifecycle Part 1 and PWA Chrome Dev Tools',
  295. 'duration': '7:28',
  296. 'seqNo': 3,
  297. courseId: 7
  298. },
  299. 25: {
  300. id: 25,
  301. 'description': 'Service Workers and Application Versioning - Install & Activate Lifecycle Phases',
  302. 'duration': '10:17',
  303. 'seqNo': 4,
  304. courseId: 7
  305. },
  306. 26: {
  307. id: 26,
  308. 'description': 'Downloading The Offline Page - The Service Worker Installation Phase',
  309. 'duration': '09:50',
  310. 'seqNo': 5,
  311. courseId: 7
  312. },
  313. 27: {
  314. id: 27,
  315. 'description': 'Introduction to the Cache Storage PWA API',
  316. 'duration': '04:44',
  317. 'seqNo': 6,
  318. courseId: 7
  319. },
  320. 28: {
  321. id: 28,
  322. 'description': 'View Service Workers HTTP Interception Features In Action',
  323. 'duration': '06:07',
  324. 'seqNo': 7,
  325. courseId: 7
  326. },
  327. 29: {
  328. id: 29,
  329. 'description': 'Service Workers Error Handling - Serving The Offline Page',
  330. 'duration': '5:38',
  331. 'seqNo': 8,
  332. courseId: 7
  333. },
  334. // Serverless Angular with Firebase Course
  335. 30: {
  336. id: 30,
  337. description: 'Development Environment Setup',
  338. 'duration': '5:38',
  339. 'seqNo': 1,
  340. courseId: 1
  341. },
  342. 31: {
  343. id: 31,
  344. description: 'Introduction to the Firebase Ecosystem',
  345. 'duration': '5:12',
  346. 'seqNo': 2,
  347. courseId: 1
  348. },
  349. 32: {
  350. id: 32,
  351. description: 'Importing Data into Firestore',
  352. 'duration': '4:07',
  353. 'seqNo': 3,
  354. courseId: 1
  355. },
  356. 33: {
  357. id: 33,
  358. description: 'Firestore Documents in Detail',
  359. 'duration': '7:32',
  360. 'seqNo': 4,
  361. courseId: 1
  362. },
  363. 34: {
  364. id: 34,
  365. description: 'Firestore Collections in Detail',
  366. 'duration': '6:28',
  367. 'seqNo': 5,
  368. courseId: 1
  369. },
  370. 35: {
  371. id: 35,
  372. description: 'Firestore Unique Identifiers',
  373. 'duration': '4:38',
  374. 'seqNo': 6,
  375. courseId: 1
  376. },
  377. 36: {
  378. id: 36,
  379. description: 'Querying Firestore Collections',
  380. 'duration': '7:54',
  381. 'seqNo': 7,
  382. courseId: 1
  383. },
  384. 37: {
  385. id: 37,
  386. description: 'Firebase Security Rules In Detail',
  387. 'duration': '5:31',
  388. 'seqNo': 8,
  389. courseId: 1
  390. },
  391. 38: {
  392. id: 38,
  393. description: 'Firebase Cloud Functions In Detail',
  394. 'duration': '8:19',
  395. 'seqNo': 9,
  396. courseId: 1
  397. },
  398. 39: {
  399. id: 39,
  400. description: 'Firebase Storage In Detail',
  401. 'duration': '7:05',
  402. 'seqNo': 10,
  403. courseId: 1
  404. },
  405. // Angular Testing Course
  406. 40: {
  407. id: 40,
  408. description: 'Angular Testing Course - Helicopter View',
  409. 'duration': '5:38',
  410. 'seqNo': 1,
  411. courseId: 12
  412. },
  413. 41: {
  414. id: 41,
  415. description: 'Setting Up the Development Environment',
  416. 'duration': '5:12',
  417. 'seqNo': 2,
  418. courseId: 12
  419. },
  420. 42: {
  421. id: 42,
  422. description: 'Introduction to Jasmine, Spies and specs',
  423. 'duration': '4:07',
  424. 'seqNo': 3,
  425. courseId: 12
  426. },
  427. 43: {
  428. id: 43,
  429. description: 'Introduction to Service Testing',
  430. 'duration': '7:32',
  431. 'seqNo': 4,
  432. courseId: 12
  433. },
  434. 44: {
  435. id: 44,
  436. description: 'Settting up the Angular TestBed',
  437. 'duration': '6:28',
  438. 'seqNo': 5,
  439. courseId: 12
  440. },
  441. 45: {
  442. id: 45,
  443. description: 'Mocking Angular HTTP requests',
  444. 'duration': '4:38',
  445. 'seqNo': 6,
  446. courseId: 12
  447. },
  448. 46: {
  449. id: 46,
  450. description: 'Simulating Failing HTTP Requests',
  451. 'duration': '7:54',
  452. 'seqNo': 7,
  453. courseId: 12
  454. },
  455. 47: {
  456. id: 47,
  457. description: 'Introduction to Angular Component Testing',
  458. 'duration': '5:31',
  459. 'seqNo': 8,
  460. courseId: 12
  461. },
  462. 48: {
  463. id: 48,
  464. description: 'Testing Angular Components without the DOM',
  465. 'duration': '8:19',
  466. 'seqNo': 9,
  467. courseId: 12
  468. },
  469. 49: {
  470. id: 49,
  471. description: 'Testing Angular Components with the DOM',
  472. 'duration': '7:05',
  473. 'seqNo': 10,
  474. courseId: 12
  475. },
  476. // Ngrx Course
  477. 50: {
  478. id: 50,
  479. "description": "Welcome to the Angular Ngrx Course",
  480. "duration": "6:53",
  481. "seqNo": 1,
  482. courseId: 4
  483. },
  484. 51: {
  485. id: 51,
  486. "description": "The Angular Ngrx Architecture Course - Helicopter View",
  487. "duration": "5:52",
  488. "seqNo": 2,
  489. courseId: 4
  490. },
  491. 52: {
  492. id: 52,
  493. "description": "The Origins of Flux - Understanding the Famous Facebook Bug Problem",
  494. "duration": "8:17",
  495. "seqNo": 3,
  496. courseId: 4
  497. },
  498. 53: {
  499. id: 53,
  500. "description": "Custom Global Events - Why Don't They Scale In Complexity?",
  501. "duration": "7:47",
  502. "seqNo": 4,
  503. courseId: 4
  504. },
  505. 54: {
  506. id: 54,
  507. "description": "The Flux Architecture - How Does it Solve Facebook Counter Problem?",
  508. "duration": "9:22",
  509. "seqNo": 5,
  510. courseId: 4
  511. },
  512. 55: {
  513. id: 55,
  514. "description": "Unidirectional Data Flow And The Angular Development Mode",
  515. "duration": "7:07",
  516. "seqNo": 6,
  517. courseId: 4
  518. },
  519. 56: {
  520. id: 56,
  521. "description": "Dispatching an Action - Implementing the Login Component",
  522. "duration": "4:39",
  523. "seqNo": 7,
  524. courseId: 4
  525. },
  526. 57: {
  527. id: 57,
  528. "description": "Setting Up the Ngrx DevTools - Demo",
  529. "duration": "4:44",
  530. "seqNo": 8,
  531. courseId: 4
  532. },
  533. 58: {
  534. id: 58,
  535. "description": "Understanding Reducers - Writing Our First Reducer",
  536. "duration": "9:10",
  537. "seqNo": 9,
  538. courseId: 4
  539. },
  540. 59: {
  541. id: 59,
  542. "description": "How To Define the Store Initial AppState",
  543. "duration": "9:10",
  544. "seqNo": 10,
  545. courseId: 4
  546. }
  547. };
  548. export function findCourseById(courseId: number) {
  549. return COURSES[courseId];
  550. }
  551. export function findLessonsForCourse(courseId: number) {
  552. return Object.values(LESSONS).filter(lesson => lesson.courseId == courseId);
  553. }
  554. export function authenticate(email: string, password: string) {
  555. const user: any = Object.values(USERS).find(user => user.email === email);
  556. if (user && user.password == password) {
  557. return user;
  558. } else {
  559. return undefined;
  560. }
  561. }