Prev Next

Angular / Angular basics

Difference between declarations, providers, and import in NgModule.

imports makes the exported declarations of other modules available in the current module.

declarations make directives (including components and pipes) from the current module available to other directives in the current module. Selectors of directives, components or pipes are only matched against the HTML if they are declared or imported.

providers make services and values known to DI. They are added to the root scope and they are injected to other services or directives that have them as the dependency.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

What is AngularJS? What are the key features of AngularJS. What are the advantages of using AngularJS? What are the key components of AngularJS Framework? What are the limitations of using AngularJS? Explain about AngularJS Expression. Can we pass parameters to an AngularJS controller? What is bower? What is a component in Angular? What are .ts extension files? How do you communicate between different modules of your application using angularjs? How does interpolation, for example "{{ someModel }}" works? What is $rootScope and how does it relate to $scope? Advantages of components in AngularJS. What is ngBind directive in AngularJS? What is ngIf directive in AngularJS? Difference between ng-show/ng-hide directives and ngIf in angularjs. Explain directives in angularJS. What is the role of selector property of components in AngularJS? Explain Angular 2 architecture. Type of module in Angular 2. Explain root module in angular2. What is an Angular module? What does the npm start do? How do I create a multiline template in the Angular component? What is RXJS and how does it relate to Angular? How to check if a variable is defined using ngIf in Angular? How to check for multiple conditions using Angular ng-if? Features of Angular2. Explain ng-container in Angular. Types of directives in Angular. Difference between Directive and component in Angular. Difference between ngOnInit and ngAfterViewInit of Angular2. Difference between Constructor and ngOnInit in Angular. What is a zone in Angular? Can we use ngIf and ngFor on the same element in Angular? What is router-link directive? Difference between router-link and [router-link] with brackets. Explain Hot Module Replacement (HMR). What is webpack? Difference between ng model and ng bind directives. What is forRoot and forChild method in angular? How do you create and register/provide service using ng CLI? Difference between declarations, providers, and import in NgModule. Explain pipes in Angular. What is angular routing? How to check the Angular version installed? Explain the structure of Angular application projects. What is angular CLI? Elements of the Component decorator in Angular. Explain Angular services. How do I create a service as a singleton in Angular? What is service worker and its advantages in Angular? How does *ngIf directive works? Difference between ng-class and ng-style directives. Difference between Component and template/templateURL. Default view encapsulation model in Angular. Types of directives in Angular. What are structural directives in Angular? Difference between Structural and attribute directives. What is <ng-template> in Angular? Explain <ng-container> element in Angular. Name a few builtin pipes in Angular that you are aware of. What are the different types of Pipes in Angular? What is JsonPipe? What are the methods in Angular FormBuilder? What is ngForm directive? What are the child classes of AbstractControl? Difference between Promises and Observable. What is NGModule? Can a Angular component be declared in multiple modules? Design a game using Angular in which the user should click on the highlighted area to score before it vanishes. Also, it should display score with different levels like easy/medium/difficult. What is tree shaking in Angular? What defines an Angular view? Difference between a view, a host view, and an embedded view. Difference between createEmbeddedView and createComponent in Angular. Various forms of data binding markup in Angular. Is ngModel an attribute directive? Mention a few roles of Services in Angular. How do I make a parent component listen for child events?
Show more question and Answers...


Comments & Discussions