Files
freeCodeCamp/guide/arabic/miscellaneous/accessing-the-database-from-your-front-end/index.md
2018-10-16 21:32:40 +05:30

12 lines
807 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Accessing the Database from Your Front End
localeTitle: الوصول إلى قاعدة البيانات من طرفك الأمامي
---
يجب أن تكون قد لاحظت في **main.controller.js** كيف تم استرداد _الأشياء_ من قاعدة البيانات وعرضها:
`$http.get('/api/things').success(function(awesomeThings){
$scope.awesomeThings = awesomeThings;
});
`
هذا ما يفعله هو استدعاء API مع طلب "الحصول على"، الذي ثم توجيهها من قبل **/server/api/things/index.js** إلى وظيفة _exports.index_ في **things.controller.js.** ستلاحظ أيضًا في **main.controller.js** أن هناك أمثلة متضمنة _لميزتي http.post_ و _$ http.delete_ أيضًا! كم هذا جميل!