What is the difference between $scope and scope?

Answer Posted / ankush

- The $ in "$scope" indicates that the scope value is being injected into the current context. $scope is a service provided by $scopeProvider. You can inject it into controllers, directives or other services using Angular's built-in dependency injector:

- scope could be anything, it's a function parameter name
function link( scope, element, attributes ) {
// Only scope
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How Directives are compiled?

1058


Where can I learn angularjs?

406


Explain AngularJS scope life-cycle?

1226


Explain ng-include directive in angularjs?

421


What are some security-related features built into the angular framework?

395






When to use factory?

483


What is the possible order of life-cycle hooks?

457


What is a router in angular?

384


What is mean stack development?

430


What is data in angular?

403


Explain what is Angular Expression?

441


Explain how does angularjs implement two-way binding?

437


What is lazy loading and how to enable lazy loading in angular 2?

422


What are the cookies methods?

500


How to do animation with the help of AngularJS?

986