Exchange Data Between Directive and Controller in AngularJS

  • The project required me to write a directive for a canvas, get the Base64 image data when a user draws on it, and make it available to the controller of the page which contains the directive.
  • This boils down to the fact that you need to access the scope of a Directive from a page Controller and access the scope of a page Controller from a Directive.
  • Now let’s say we have the following controller:

    And the following template:

    The problem: we would like to bind the count variable of myCtrl to the internalCount variable of the counter directive.

  • This can easily be solved by binding a variable from the controller to the scope of the directive.
  • Your directive should now look like this:

    And your template like this:

    You will find a working fiddle here with all the code to this quick tutorial on how to exchange data between a directive and controller in AngularJS.

In this Quick Tutorial we will look at How to Exchange Data Between Directive and Controller in AngularJS and bind the scopes to each other.
Continue reading “Exchange Data Between Directive and Controller in AngularJS”

DailyJS: Signature Pad, Windows 8.1 Apps with Open Source JavaScript

  • This screencast by Ala Shiban demonstrates how to use some of Microsoft’s technologies with open source projects like AngularJS to create a Windows Store application.
  • I put together a 17 minute video that gets you started with writing a native Win8.1 app using HTML, CSS, JavaScript, TypeScript, AngularJS, Bootstrap, underscore, BankersBox and jQuery.
  • It uses TypeScript, Blend for Visual Studio, NuGet, jQuery, AngularJS, Underscore, and Bootstrap.
  • I haven’t used Windows 8 or Visual Studio much before, so I thought it was interesting seeing how it integrated with third-party open source JavaScript libraries through NuGet, and how debugging JavaScript worked.
  • I noticed Ala had to wrap some calls inside AngularJS (mainly things that wrote to ) to satisfy Microsoft’s security requirements for Windows Store apps.

Signature Pad (GitHub: szimek / signaturepad, License: _MIT) by Szymon Nowak is a client-side library for drawing smooth signatures. It works with touchscreens and desktop browsers, and was inspired by the Smoother Signatures post on Square’s (excellent) engineering blog.
Continue reading “DailyJS: Signature Pad, Windows 8.1 Apps with Open Source JavaScript”

Pros of Choosing AngularJS Technology for Your Business

Why should businesses be choosing #AngularJS?

  • Code pattern is easy to work with

    The web application of angularJS is designed in such way that HTML is the main structure for design.

  • angularJS web application development is such that one does not write the coding and create your own MVC.
  • angularJS provides HTML to describe the application user interface.
  • If you are planning to remodel or create a new website for your company, try angularJS web applications.
  • Try the innovative feature of angularJS to have a better user experience for your web application.

The AngularJS Development technology is such that you do not have to depend much on coding that was done previously.
Continue reading “Pros of Choosing AngularJS Technology for Your Business”

AngularJS vs Knockout.js vs Vue.js vs Backbone.js: Which Framework Suits Your Project Best?

  • Besides, each of the reviewed frameworks can be used as a front-end element in full stack JavaScript development services, an approach that allows you to build applications from A to Z using just one technology stack.
  • Chris Bitting, Marketing Technology Manager & Developer at Cozen O’Connor, had this to say on using the framework: “I’ve come to rely on AngularJS to be fast and easy to implement and easy to manage moving forward.
  • With such features as data binding and dependency injection that make building dynamic pages easier, the main purpose of the framework is certainly Single-Page Applications.

  • Vue.js is one of the most flexible frameworks that can be both integrated with other libraries and used for large, existing projects.
  • When building a Backbone.js application, you will certainly need a lot of libraries and add-ons, and while many enjoy extensibility, novices may find working with the framework exhausting.

Last year, IBM named JavaScript one of the best programming languages to learn in 2017. Indeed, used by 90.5 percent of developers for both front- and back-end,
Continue reading “AngularJS vs Knockout.js vs Vue.js vs Backbone.js: Which Framework Suits Your Project Best?”

So Many Angulars these days

So many Angulars now..
#Angularjs #Angular2 #Angular4

  • ■ AngularJS has a mechanism for creating custom HTML tags and attributes using the concept of directives, which allow you to extend the set of HTML tags according to your application’s needs.
  • You can add an ng-app attribute to any tag, and only the content of thiswill be controlled by AngularJS.
  • ■ AngularJS allows you to bind data to views easily.
  • Creating Controllers, dom manipulating, 2 way data binding like a champ.
  • Creating Controllers, dom manipulating, 2 way data binding like a champ.

Ok, this post is  me trying to clear up some confusion. Let me break this down as I understand it. AngularJs does the following. ■ AngularJS has a mechanism for creating custom HTML tags and attributes using the concept of directives, which allow you to extend the set of HTML tags according to your application’s…
Continue reading “So Many Angulars these days”

History of AngularJS

  • It all started in 2008 and 2009, Misko hevery (a developer at Google) working on a part time project to simplify web application development.
  • At that point of time Brad Green manager of Misko at Google asked him to work on one of the Google internal tool called Google Feedback Tool.
  • Then he said “You guys are all liars, Yes you had a great success on one small project small for Google scale,until you do something at large scale you really don’t know what you are talking about ”

    According to Brad Green this is a great quote about Angular.

  • His team consist of few C# developers and JavaScript developers and they do not have much idea about Google web toolkit (GWT).
  • In the journey of AngularJs it lost Database and became powerful front end JavaScript framework (which is original idea of Misko to develop end to end project to help web developer)

    Do not miss any post from us follow @

When I started learning AngualJs I have couple of questions in my mind like who is the creator AngularJs? When it started? Why its named Angular? etc etc.
Continue reading “History of AngularJS”

Exchange Data Between Directive and Controller in AngularJS

  • The project required me to write a directive for a canvas, get the Base64 image data when a user draws on it, and make it available to the controller of the page which contains the directive.
  • This boils down to the fact that you need to access the scope of a Directive from a page Controller and access the scope of a page Controller from a Directive.
  • Now let’s say we have the following controller:

    And the following template:

    The problem: we would like to bind the count variable of myCtrl to the internalCount variable of the counter directive.

  • This can easily be solved by binding a variable from the controller to the scope of the directive.
  • Your directive should now look like this:

    And your template like this:

    You will find a working fiddle here with all the code to this quick tutorial on how to exchange data between a directive and controller in AngularJS.

In this Quick Tutorial we will look at How to Exchange Data Between Directive and Controller in AngularJS and bind the scopes to each other.
Continue reading “Exchange Data Between Directive and Controller in AngularJS”