Basic Interview Questions

  1. What is angular2 ?
  2. What are the differences between the angular1 and angular2 ?
  3. How to declare a component in angular2 ?
  4. Difference between the observer and promise .
  5. Difference between the component and directive?
  6. What is ECMA ? Note :ECMA stands for European Computer Manufacturer’s Association. Developed by Brendan Eich of netscape navigator
  7. Discuss over the ngOnInit() and the constructor()
  8. Define ActivatedRoute. Also , focus on x.params.subscribe and x.url.subscribe :   r.url.subscribe((s:UrlSegment[])
  9. How to create shared module in angular6
  10. What is template variable . How it is used ?

    Another way :

    Through @ViewChild()  decorator

  11. What is lazy loading ?

    Lazy loading is a concept in Angular4 , in which only the module required gets loaded. Not the all modules. We can achieve lazy loading by following ways

    Step 1 : Create a module shop

Step2 : Create components like cart , checkout , confirm inside it

Inside the app.module.ts apply following route

Now, create shop.routing.ts inside the shop folder.

Use shop.routing.ts inside the app.module.ts

Some of browsing url’s




By Pankaj Kumar Agarwal

Leave a reply:

Your email address will not be published.