Skip to main content

Posts

Showing posts with the label Angular 2 *ng-for loop with live demo example

Angular 2 exception logging

These packages provide an easy to use angular 2 error logging system for applications and each logger has an Observable. //Install npm module. npm install //logging/save angular2-log //For Example System.config({ map: { 'angular2-log' : 'node_modules/angular2-log' }, packages: { 'angular2-log' : { defaultExtension: 'js' } } }); //Add angular2-logger library in your apps. import { Logger } from "angular2-logger/core" ; //Inject your logger into your objects and use it. export class Component { constructor( public Logger: Logger) { this.Logger .error ( 'This is custom error !' ); } } Live Result, For more go below links, http://www.bennadel.com/blog/3039-logging-error-streams-to-the-server-in-angular-2-beta-6.htm https://www.npmjs.com/package/angular2-log I hope It help you!

12 Best Advantages of Angular 2 & ReactJs [Angular2 vs. ReactJs]

Google’s Angular 2 and Facebook’s React are popular tools today for building browser web  applications and both are awesome that compression looks like Apple vs. Oranges . Angular 2:- 1.       The size of Angular 2 is 764k (this is minified version). 2.       It is Google’s framework. 3.       Angular 2 not yet browser tools or extensions. 4.       Bunch of Angular specific syntax involved. 5.       Manual debugging, lack of completion support. 6.       Web components friendly. ReactJs :- 1.       The size of React is 151k (this is minified version). 2.       It is Facebook’s open source library . 3.       React has great browser tools and extensions 4.       Only JavaScript syntax involved. 5. ...

How to use jQuery with Angular 2?

Using  jQuery  with  Angular 2 , if we are using typescript (5, 6 and 7 versions) we should first add jQuery reference definition. Stayed Informed   –   Angular 2 vs. Angular 1 Stayed Informed  –  Best Angular 2 Interview Q/A We can see below line of code to install jQuery i.e. tsd install jquery --save OR typings install dt~jquery --global –save And also we need to add the  ts  reference file. /// <reference path= "../typings/jquery/jquery.d.ts" /> Then make the necessary imports import {bootstrap} from 'angular2/platform/browser'; import {Component, ElementRef, AfterViewInit} from 'angular2/core'; Now, declare jQuery module and the declaring jQuery variable as JQueryStatic will give us a typed reference to jQuery. 1 2 3 4 declare module "jquery" { export = jQuery; } declare var jQuery: JQueryStatic ; In the last, write the class and components 1 2 3 4 5 6 7 8...

69 Best Angular 2 Interview Questions and Answers [Angular 2]

Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop. Explore Angular in details. AngularJs Angular 2 Angular 4 Angular 5 Angular 6 Angular 7 Angular 8 TypeScript => View All Are you preparing for Angular Interview? Buy this book (Including Version 7, 6, 5, 4, 2) Are you preparing for an Interview? Follow these Tips 1. What is Angular 2? Angular is a most popular web development framework for developing mobile apps as well as desktop applications. Angular framework is also utilized in the cross platform mobile development called IONIC and so it is not limited to web apps only. Angular is an open source framework written and maintained by angular team at Google and the Father of Angular is Misko H...