What is a Flux in the context of Spring WebFlux?
1.A data structure holding 0 to N elements.
2.A data processing operation.
3. A type of database.
4. A network protocol.
What is the use of Angular Directives?
1. To inject services
2.To initialize component state
3. To manipulate the DOM elements
4.. To store data
Which directive is used in Angular to add/remove an HTML element from the DOM based on a condition?
1.ngFor
2.ngSelect
3.ngSwitch
4.ngIf
Angular is primarily considered as?
1.A JavaScript Framework
2. A CSS Framework
3. A content management system
4.A database system
How can you bind to an input box value in Angular?
1.Using ngValue
2.Using ngBind
3.Using [(value)]
4. Using [(ngModel)]
How can you execute a long-running task in a separate thread using WebFlux?
1.publishOn
2.subscribeOn
3.block
4.asyncRun
How can you fetch data from a server or database in Angular?
1.Using the HTTPModule
2.Using the FetchAPI
3.Using the ServerModule
4.Using the DatabaseModule
How can you generate a new service using Angular CLI?
1.ng create service my-service
2.ng generate service my-service
3.ng new service my-service
4.ng add service my-service
How do you bind data to an attribute in Angular?
1.variable
2.variable
3.variable
4.variable
How do you define a route in Angular?
1. Using <a> tags
2.Using the Router service
3. Using the Routes array
4.Using the @Route() decorator
How do you fetch data from a server or API in Angular?
1.Using the XMLHttpRequest object
2.Using the HttpClient module
3.Using the fetchData method
4.Using the AjaxModule
In Angular, which directive is used to apply styles conditionally?
1.ngStyle
2.ngClass
3.ngIf
4.ngApply
In Spring WebFlux, which component is responsible for handling incoming HTTP requests in a non-blocking manner?
1.WebHandler
2.ReactiveHandler
3.FluxHandler
4.MonoHandler
In which lifecycle hook is it recommended to send HTTP requests in an Angular component?
1.constructor
2.ngOnInit
3.ngOnDestroy
4.ngAfterViewInit
What decorator is used to create a service in Angular?
1.Directive
2.Component
3.Injectable
4.Service
What does a pipe do in Angular?
1.Connects two components
2.Transforms data in the template
3.Merges streams of data
4.Opens a direct connection to the server
What is a Mono in the context of Spring WebFlux?
1.A data structure holding 0 or 1 element.
2.A data structure holding multiple elements.
3.A data processing operation.
4.A type of database.
What is the main difference between constructor and ngOnInit in Angular?
1.They serve the same purpose
2.constructor is used for initialization, while ngOnInit is used for destruction
3. constructor is used for dependency injection, while ngOnInit is used for initialization logic
4.ngOnInit is used for dependency injection, while the constructor is used for initialization logic
What is the primary motivation behind Spring WebFlux?
1.Object-relational mapping
2. MVC pattern
3.Reactive programming
4. Synchronous processing
What is the primary purpose of NgModules in Angular?
1.Error handling
2.Two-way data binding
3. To group together components, directives, and services that are related
4. To enhance performance
What is the purpose of the async pipe in Angular?
1.To make asynchronous HTTP requests
2.. To automatically unsubscribe from observables or promises
3.To pause the execution of the application
4. To run change detection asynchronously
What purpose does the ngModel directive serve?
1.Handling HTTP requests
2.Data binding for both input and output
3.Listening to DOM events
4.Controlling animation
What's the primary purpose of the ngOnInit lifecycle hook in Angular components?
1.Initialization and data retrieval
2.Destruction of instances
3.Manipulation of the view's DOM
4. Handling of user input
Which Angular decorator is used for making a class a root module?
1.Module
2.Component
3.Directive
4.NgModule
Which Angular decorator is used to listen to DOM events?
1.Output
2.Input
3.Event
4.HostListener
Which annotation is used to define a reactive REST controller in Spring WebFlux?
1.Controller
2.RestController
3.ReactiveController
4.RestControllerFlux
Which command is used to create a new Angular project?
1.npm create angular-app
2. ng new project-name
3.angular init project-name
4.npm start angular
Which command is used to install Angular CLI globally?
1.npm install @angular/cli
2.npm global install @angular/cli
3.npm install -g @angular/cli
4.. npm --install @angular/cli
Which decorator allows communication from a child component to its parent?
1.Input
2.Output
3.ViewChild
4.Connect
Which decorator allows you to define styles for a component?
1.Style
2.ViewStyle
3.ComponentStyle
4.Component({styles: ...})
Which decorator in Angular is used to get data from a parent component?
1.Input
2.Output
3.ViewChild
4.GetData
Which decorator is used to listen to host events in an Angular directive?
1.EventListener
2.HostBinding
3.HostListener
4.Listen
Which directive is used in Angular to loop through an array or object?
1. ngFor
2.ngIf
3. ngSwitch
4.ngWhile
Which is the correct syntax for an Angular Event binding?
1.{click}="doSomething()"
2.on-click="doSomething()"
3.(click)="doSomething()"
4.click[]="doSomething()"
Which module in Angular includes basic directives like ngIf and ngFor?
1.BrowserModule
2.FormsModule
3.AppModule
4.CommonModule
Which of the following is a core component in an Angular application?
1. ViewController
2.Directive
3.Activity
4.Observer
Which of the following is a core reactive type in Spring WebFlux?
1.List
2.Set
3.Mono
4.HashMap
Which of the following is NOT a core component of Spring WebFlux?
1.Mono
2.Flux
3.Callable
4.RouterFunction
Which of the following methods is used to handle errors in a Subscriber?
1.onSubscribe
2.onNext
3.onError
4.onComplete
Which reactive type represents a stream of multiple items in WebFlux?
1.Mono
2.Duo
3.Flux
4.ReactiveStream