Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Angular 2 Online Programming Test

Topics Covered

  • Angular 2 Directives
  • Angular 2 Events
  • Authorization
  • Angular 2 Components
  • Functions and Applications

Useful for hiring

  • Angular Developer
  • Web & Mobile Developer
  • Front End Engineer –Angular
  • Front End Developer

Start hiring job-fit candidates using this assessment

GET A DEMO

"We are impressed with Interview Mocha's comprehensive IT skill test batteries and their ability to provide tailor-made assessments quickly. The results we got from Interview Mocha exceeded our expectations, employees found the tests quick, fun, and a benchmark of their knowledge."

Ajay Garg, Siemens,
Associate Manager
Question

The given code snippet uses the ngStyle directive to color the Div text randomly.
 

 
    I would be styled with different colors dynamically 

Which of the following implementation of the function getRandomColor is valid?
 

Answer
    • getRandomColor() function returns a value of the form #ffffff
       

    • getRandomColor() function returns a value of the form rgba(100,150,200)
       

    • getRandomColor() function returns a value of the form rgb(1,2,3,4)
       

    • getRandomColor() function returns a value of the redd format
       

Question

An angular 2 project written in typescript is transpiled to javascript during the build process. Which of the following additional features are provided to the developer while programming on typescript over javascript?

Note: There can be multiple correct answers to this question.

Answer
    • Ability to use newer syntax and offers reliability
       

    • Compatibility
       

    • Usage of missing features
       

Question

A component implements the OnInit interface. Which of ngOnInit() and the component constructor will be called first?

Answer
    • ngOnInit()
       

    • component constructor
       

    • either of them depending on the template of the component
       

    • constructor and ngOnInit methods cannot co-exist
       

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at support@interviewmocha.com to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...
GET A DEMO

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates

GET A DEMO