No comments yet

Shristi Times – Issue 1

Shristi Times

DEC 2014, ISSUE 1

Have you heard about AngularJS ?

  • Angular JS is a javascript framewok which is used to create single page responsive web applications. This uses HTML as the template language and extends HTML syntax to express the application components clearly.

  • Angular JS is used to create structured, testable, maintainable front-end application. It is a MVC framework from Google.

  • It implements two-way data binding, connecting your HTML (views) to your JavaScript objects (models).

    Basic components of Angular JS are

    Directives

    • Are extended html attributes that mark it as an Angular-JS application

    Expressions

    • Binds application data to html view

    Controllers

    • Are java-script objects

    Modules

    • Are containers

    Services

    • Are substituteble objects that are wired together using dependency Injection

    Learn with us

    • Today in this issue, let us learn how to create a simple Angular JS application.
    • To work with angular you need to download angular-min.js or use the file from CDN. The Google CDN provides access to libraries of Angular JS

    In this example , I have downloaded angular-min.js file and using the same file

    Steps to create an simple Angular JS Application

    • Create a static web application using any Text Editor like sublime2 or an IDE[I am using eclipse].
    • Create a folder called scripts inside web [webcontent in case of eclipse] folder and add the downloaded file to this folder.
    • Create a html file and add the below given code.

      AngularJs 1

      Using Directives
      ng-app
      This directive converts the html page as an Angular JS application.

    • This is the root element of an AngularJS application.
    • It will initialize the application automatically when a web page gets loaded.
    • This directive loads the controller for that page
    • You can add this directive to any html tag. I am adding this to <html> tag

      Angularjs 2

      ng-model
      This directive binds HTML elements to application data. The value of the html element like text field is assigned to application data.

      Angularjs 3

      ng-bind
      This directive retrieves the value from the application data and provides to Html view. To get the html view expressions also can be used

      AngularJs 4

      Expressions
      Expression also bind application data to html view. They help to get dynamic values in html.
      The syntax for expressions is {{ }}

      AngularJs 5

      How it works?

      • The HTML document gets loaded into the browser, and gets evaluated. The AngularJS JavaScript file gets loaded and the angular global object is created

      • AngularJS scans the HTML code to look for AngularJS apps . Once found, starts working with the model and views. Your page is now ready.

      • Try doing this and see the output by typing your name. You can do more magic working with Angular applications.

Do you know?

An awareness about Ebola

  • Ebola Virus Disease (EVD)  is a severe, often fatal illness in humans.
  • The virus gets transmitted to people from wild animals and spreads in the human population through human-to-human transmission.
  • The average EVD case fatality rate is around 50%.
  • The first EVD outbreaks occurred in remote villages in Central Africa, near tropical rainforests.
  • Early supportive care with rehydration, symptomatic treatment improves survival.
  • Currently there is no licensed treatment or vaccines proven to neutralise the virus but a range of blood, immunological and drug therapies are under development.

 

source:http://www.who.int/mediacentre/factsheets/fs103/en/

Puzzle Corner – PC01

Try this out

Hadoop big data 1

 

Only 2 people on the raft at a time.

  • The Father cannot stay with any of the daughters, without their Mother’s presence.
  • The Mother cannot stay with any of the sons, without their Father’s presence.
  • The thief (striped shirt) cannot stay with any family member, if the Policeman is not there.
  • Only the Father, the Mother and the Policeman know how to operate the raft.

 

Answers in next issue

Quiz time – QT01

  1. ____________ is a server side javascript framework
  2. The technology that is used to send asynchronous request to the server is __________
  3. _____________ is a javascript library
  4. Which jquery function is used to prevent the code from running before the document finishes loading?
  5. __________ directive specifies that the application is an angular application

Answers in next issue

Interesting Facts

Hadoop” was the name of Doug Cutting’s  son’s toy elephant. Doug used this name for his open source project because it was easy to pronounce and to search in google.

News Updates

The next version of Angular JS 1.3.1 was announced by Google and named as “superluminal-nudge”.  This release brings in improved APIs, performance boosts, and bug fixes.

During the release in the article “AngularJS 1.3.0 – superluminal-nudge”, Brian Ford — developer program manager for Google — elaborated on the improvements, saying:

“[AngularJS] 1.3.0 has substantial performance improvements that reduce memory consumption, increase the speed of common DOM operations, and improve overall latency of Angular app.  By popular demand, AngularJS now officially has packages published to npm. You can do npm install angular to get AngularJS 1.3.0. We hope this makes it easier for developers to make use of some of the great tools built around npm for front-end web development “

Post a comment

{"wp_error":"cURL error 60: SSL certificate problem: certificate has expired"}