A service एक क्लास हो non-UI logic को लागि — data fetching, business rules, shared state, logging — जो components ले पुनः प्रयोग गर्न सक्छन्। Dependency Injection (DI) यो हो कि Angular ले ती services लाई components मा कसरी प्रदान गर्छ, जसको सट्टामा components ले तिनलाई आफैले बनाउँदैनन्।
एक service परिभाषित गरी
{ } ;
({ : })
{
users = [];
() { .; }
() { ..(u); }
}
