Learn the Concept of Streams in Node.js

Learn the Concept of Streams in Node.js  #AngularJS #php #emberjs

  • Streams in Node.js

    In Node.js, streams are the objects which help the developer read data from the file or write date to file present at a particular location on machine in a regular fashion.

  • Reading from a Stream

    In this case, we are going to read data from the file ‘inputFile.txt’ which is present at a particular location on the machine.

  • Now, create a Node.js project in eclipse with the name as ‘StreamsNodeJSApplication’ and add a js file with the name as When we execute the code present in the ‘file-stream-reader.
  • To write to a stream into a file ‘’,we are going to use the same Node.js project ‘StreamsNodeJSApplication’ and add a js file with the name as ‘file-stream-writer.
  • Output

    When we execute the code present in the ‘piping.js’ file by using the node command, we can observe the following output.

In this blog, we will discuss about the reader & the writer streams of Node.js along with their frequently emitted events which are emitted by these streams
Continue reading “Learn the Concept of Streams in Node.js”

Understanding AngularJS transclude in directives

  • One of my favorite features of AngularJS are directives.
  • I’ll write later about directives, but for now I’ll talk only about the concept of transclusion.
  • I believe the explanation given in the official documentation is kinda obscure, and since I think transclusion is actually very useful when writing your own AngularJS directives, I’ll share an answer I gave in StackOverflow about how to understand AngularJS transclude.
  • Consider a directive called myDirective in an element, and that element is enclosing some other content, let’s say:

    If myDirective is using a template, you’ll see that the content of

     will be replaced by your directive template.

  • So now your directive will look something like this:

    In conclusion, you basically use transclude when you want to preserve the contents of an element when you’re using a directive.

One of my favorite features of AngularJS are directives. They’re extremely modular and reusable components to “enhance” HTML, a different approach to regular JavaScript or JQuery widgets. I’ll write later about directives, but for now I’ll talk only about the concept of transclusion. I believe the explanation given in the official documentation is kinda obscure, and since I think transclusion is actually very useful when writing your own AngularJS directives, I’ll share an answer I gave in StackOverflow about how to understand AngularJS transclude.
Continue reading “Understanding AngularJS transclude in directives”

Learn HTML

  • Cookies help us deliver our services.
  • By using our services, you agree to our use of cookies

Learn HTML tag with code syntax.
Continue reading “Learn HTML”

Learn the Concept of Streams in Node.js

Learn the Concept of Streams in Node.js  #AngularJS #php #emberjs

  • Streams in Node.js

    In Node.js, streams are the objects which help the developer read data from the file or write date to file present at a particular location on machine in a regular fashion.

  • Reading from a Stream

    In this case, we are going to read data from the file ‘inputFile.txt’ which is present at a particular location on the machine.

  • Now, create a Node.js project in eclipse with the name as ‘StreamsNodeJSApplication’ and add a js file with the name as When we execute the code present in the ‘file-stream-reader.
  • To write to a stream into a file ‘’,we are going to use the same Node.js project ‘StreamsNodeJSApplication’ and add a js file with the name as ‘file-stream-writer.
  • Output

    When we execute the code present in the ‘piping.js’ file by using the node command, we can observe the following output.

In this blog, we will discuss about the reader & the writer streams of Node.js along with their frequently emitted events which are emitted by these streams
Continue reading “Learn the Concept of Streams in Node.js”

AngularJS Tutorial

Learn AngularJS #angular2 #angularjs #javascript #programming #love

AngularJS Tutorial

Learn AngularJS #angular2 #angularjs #javascript #programming #love

AngularJS Tutorial