background preloader


Facebook Twitter

Improving the Yeoman Generator Gulp Angular ← David Barreto. The Yeoman generator generator-gulp-angular is a great tool for building AngularJS and in my opinion is much better than the official Yeoman generator for AngularJS (generator-angular), because it uses Gulp and not Grunt as the task runner, it has a component-like folder structure for the code instead of the “drawer” style, it uses libsass instead of compass (ruby), it supports Typescript and has a lot of options for configuration. But there is a thing that I don’t like: how it handles bootstrap-sass. The problem is that when dealing with styles, the generator creates two separate files, one with all the styles from the libraries installed using bower and one with all the styles created by us.

This means that our sass files can’t use Bootstrap variables and mixins and that we can’t override Bootstrap internals to have complete control over the framework. The process of the sass files are done in the file “gulp/styles.js”. How the “styles” task works Step 1: Getting the files. 10 Best Tutorials To Learn AngularJS. AngularJS is an awesome Javascript framework that can be used to create powerful and dynamic web apps. It also covers the building of complex client-side applications. Since its release in 2009, AngularJS has been widely used by many developers for its convenient extending of custom HTML tags and attributes, known as ‘directives’.

For some people, learning Angular through its official documentation is not enough. They prefer a video-based tutorial instead, or a more sophisticated learning site with specific discussions, a demo, the try it yourself feature and the like. So in this post, we’re listing 10 AngularJS tutorial and screencasts that will kickstart your Angular learning.

Recommended Reading: Getting started with AngularJS 1. This well-written tutorial by Year of Moo is going to teach you the very basics of how AngularJS works and what it can be used for. 2. If you like to learn by coding then this AngularJS tutorial by Marcin Wosinek is what you’re looking for. 3. 4. JHipster home page.

Angular 2

Tim Kindberg on Angular UI-Router. Most Common Mistakes AngularJS Developer Make. Single page apps demand the front-end developers to become better software engineers. CSS and HTML are not the biggest concern anymore, in fact, there is no longer just a single concern. The front-end developer needs to handle XHRs, application logic (models, views, controllers), performance, animations, styles, structure, SEO, and integration with external services. The result which emerges from all those combined is the User Experience (UX) which should always be prioritized.

AngularJS is a very powerful framework. It is the third most starred repository on GitHub. It is not difficult to start using, but the goals that it is intended to accomplish demand comprehension. No longer can AngularJS developers ignore memory consumption, because it will not reset on navigation anymore. Common Mistake #1: Accessing The Scope Through The DOM There are a few optimization tweaks recommended for production. Angular.element(document.body).scope() Common Mistake #2: Not Having a Dot In There What . Sahat/satellizer. 10 Best Bootstrap AngularJS Admin Themes Collec... - Angularjs Themes,Templates and Components - Quora. AngularJS Bootstrap Admin theme is an open source web application framework maintained by Google and a community of individual developers and corporation to address of the challenges encountered Developing single page application. The admin theme user interface can be an important part of the project in terms of usability, so you’ll want to be careful to select a quality template that is well suited to the needs of your project.

Here is list of Best Bootstrap Angularjs Admin Themes Collection for you. 1) Singular Bootstrap Admin Theme + AngularJSSingular is an AngularJS Single Page Application based on the Bootstrap 3 framework. 2) Monarch Bootstrap Admin Frontend Theme With AngularJSMonarch is an all-in-one solution for creating both extensive dashboard panels for web, mobile and tablet applications, and also presentation websites which area very easy to compose because of the modular components architecture. . ( DEMO | DOWNLOAD )10)PixPro Admin Dashboard theme with AngularJS. The Many Ways To Use ngClass. Using ngClass For our examples and tutorials here, we’ll be using input boxes (text and checkbox) to dynamically/conditionally add classes to our HTML elements. ngClass Using String Syntax This is the simplest way to use ngClass. You can just add an Angular variable to ng-class and that is the class that will be used for that element.

<input type="text" ng-model="textType"><div ng-class="textType">Look! I'm Words! Here’s an example of binding a variable to the class using the string syntax: ngClass Using Array Syntax This is similar to the string syntax method except you are able to apply multiple classes. <input type="text" ng-model="styleOne"><input type="text" ng-model="styleTwo"><div ng-class="[styleOne, styleTwo]">Look!

NgClass Using Evaluated Expression A more advanced method of using ngClass (and one that you will probably use the most) is to evaluate an expression. When evaluating an expression, you must use the {} curly brackets so that Angular knows to evaluate that expression. AngularJS - Manipulating the DOM after ng-repeat is finished. AngularJS. AngularJS is a JavaScript framework for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly. The integration between AngularJS and jQWidgets is implemented through a plug-in which we called jqxAngular.

This plug-in includes AngularJS directives for all widgets. Getting Started Add references to jQuery, AngularJS and jQWidgets files. In the AngularJS app definition, pass the jqwidgets module dependency: var app = angular.module("app", ["jqwidgets"]); Component Markup To create a widget, you can simply make an HTML element matching the widget name, and add a "-" after "jqx".

Example: <title>Button directive from attribute for AngularJS</title> var demoApp = angular.module("demoApp", ["jqwidgets"]); demoApp.controller("demoController", function ($scope) { You can also create a widget by using an attribute or class. <button jqx-button>Button</button> or data-prefixed $("#button").jqxButton(); How do I "think in AngularJS" if I have a jQuery background? Part II: ng-grid and a Real REST API. jQuery inputmask plugin + AngularJS - valve's. The plugin I was going to use was jquery inputmask by Robin Herbots.

I was working on a small angularjs application and needed a text input masking to force users to enter their telephone numbers in a certain format. “So, what’s the problem?” – I thought. I added the neccessary code: … only to find out that $scope.application was undefined and no phone value never made it to controller. I decided to use any angular-specific masking library and found one, but it was still buggy and couldn’t handle my simple +7(999)999-99-99 mask. Exasperated, I tried several input masking plugins for jQuery, but none of them worked with angular. Then I stumbled upon this and this and understood: One must wrap a jQuery plugin into a directive in order for the plugin to work. Easy-peasy, let’s do it. Having prepared myself with the documentation on the subject, I wrote version #1: And the html: How do I get rid of hardcoded bindings?

Examples. Build AngularJS Grid with server side paging, sorting & filtering | Nadeem Khedr. I will be showing how to build a grid that supports server side paging, sorting & filtering My goal with this is that i didn’t want to implement a more complex approach that will be hard to customize later, so what i ended up doing is implementing a solution that will show a list of data in a table like structure and implement a reusable solution for paging, sorting & filtering Our result will look like this: There are three major parts in this Pagination, Sorting & filtering First lets look at the html that construct this grid Sorting We are iterating over all the headers in our grid then use a custom sort-by directive its function is two things Render the title and the sort direction indicator.

Here is the code for sortBy directive sortBy.js sort-by.html Filtering As you can see in the inputs we are using two custom attributes on-blur-change passing it a callback function & on-enter-blur onBlurChange.js onEnterBlur.js Pagination Like this: Like Loading... Rainbow - Responsive Admin App with AngularJS. Intro “Rainbow” is a fully responsive multi-layout admin App built with AngularJS. It use Sass CSS which makes it easy to modify. (The latest version is 1.3) Prefer to use LESS CSS? Features Responsive Design. Please rate it if you like it, it helps for more updates, thanks so much! Credits Bootstrap The most popular front-end framework for developing responsive, mobile first projects on the web.jQuery write less, do more.AngularJS HTML enhanced for web Apps! Changelogs. AngularJS – Single Page App with RESTful APIs & Spring MVC. AngularJS – Role based access on GUI | Swarm of XeBees. Sharebar These days we are busy in coding for frontend in our application and we are primarily using angular for that.

A recent requirement was for role based access on GUI. A person can have multiple roles assigned to him and it was needed that a he should be able to access only that portions of GUI for which he is authorized. We approached to solve the issue by restricting the access of the application's GUI at mainly 2 levels: A person should be able access only those pages (or we can say routes) for which he is authorized.On a page a person should see only those portions for which he is authorized. To address 1 above we captured route change event and on every route change we will check if user is authorized for next route, in case he is not we will show him access denied page.

$rootScope. authService above is a service we have created which has list of the roles user has and the routes each role is authorized for. <div my-access=”ROLE_ADMIN”>...... Be Sociable, Share! AngularJS Interview Questions - Set 4 - Bytes Cravings. The article represents another set of 10 interview questions primarily related with dependency injection. Following are another set of questions that have already been published earlier. Question:Describe what happens when Angular compiler comes across “ng-controller” directive?

Ans: As the Angular compiles the HTML and come across the “ng-controller” directive (e.g. ,<body ng-controller=”HelloCtrl”>), it asks the injector to create an instance of controller and its dependencies. Injector then looks out for any mechanism that has been specified by the user for creating the controller. Following is another (recommended) way to instantiate the controller: Thus, the injector uses one of the above mechanism to instantiate the controller. Question:Describe what happens when Angular compiler comes across “ng-app” directive? Ans: As Angular compiler comes across the “ng-app” directive, it looks out for the mechanism used by the user to instantiate the module. Ajitesh Kumar. AngularJS: A Detailed Guide for Beginners. If you’ve not got your hands on AngularJS yet, you’re missing awesome features that can really make the most of HTML for web apps.

Unlike Backbone.js and Ember.js, AngularJS is a next generation JavaScript framework where each component works with every other component in an interconnected way to make your web applications stand out. This article is designed to give a comprehensive knowledge of AngularJS, a structural framework for dynamic web applications, without reading a lot of unnecessary stuff. You will learn what AngularJS is, what its most compelling features are and how to get started with it. AngularJS Introduction AngularJS is an open-source web application framework designed with the aim of making development and testing tasks easier for web developers. It is a fully extensible client-side MVC/MVVM framework that runs with no library dependencies and also works well with other libraries.

Notable Features Directives Following are some of the most used Directives: Templates Testing. 5. AngularJS Fundamentals in 60 Minutes - Modules, Routes and Factories. AngularJS Best Practices: I’ve Been Doing It Wrong! Part 1 of 3 | Three sanity-preserving ideas that will make me and you 10x more productive with real-world AngularJS applications. This is the first in a three-part series on practical large-scale development with AngularJS. The TL;DR version is at the end of the article. I’ve been working on a large webapp that uses AngularJS for a few months now. As many developers who pick up new things as they go do, I started with the tutorial (in the state it was a few month ago), adapted the parts of its code I understood into the app, and grew it from there, gradually adding and changing the code, which over time became harder and harder to manage.

But it does not have to be that way. So, this post is sort of a note to myself, but I’ll be glad if it helps anybody else to keep their Angular projects from turning into a mess. Here are the three areas where I’m improving my AngularJS development, with the aid of the latest and greatest tools: Project layout: it’s important how you structure your directories. Grunt. Common Problems (And Solutions) When Using Select Elements With Angular.JS « GuruStop (.NET & web-dev tips by @Meligy) I have been doing Angular.JS in production projects for months, that it did surprise me recently how I haven’t used drop-downs in it.

Well, I mean how I haven’t used them enough to get into several problems I had in my current project, and other friends at the same office had in their project as well. To save you the pain I went through, I’ll list some problems and solutions here, and then give you a video that shows going through all of them ans the thought process that led to the solutions. Initial selection Assuming someObject in the model has the same properties and values as someObject in the objectList, it will still not be selected. It’ll only be selected if someObject was actually one of the objects in objectList, like objectList[0] or whatever. Otherwise, Angular.JS will insert an empty option tag with no value or text and select that. Root Cause Angular.JS uses native JavaScript comparison for comparing the objects. Solution Invalid Value Sent On Server-Side Submit Workaround.

Gik's notes » Application configuration in AngularJS. Resolve - AngularJS Video Tutorial #free. John Lindquist: The resolve property is basically a list of promises, of things that need to happen before your controller will instantiate, and your template will load and everything will set up. So, it's a way of routing to say, "Hang on. I've got some stuff to do first. " Let's set up a resolve called "app" instead of a resolve property. This is basically a map two or app controller, and we'll just say this is a function. You'll see right now if we reload, nothing will happen because the promise hasn't been fulfilled.

Say for example, what you'll see in a lot of the examples that show this, there's a time out service you can use. This is also useful for things like using the http service and a whole bunch of other things you may want to do before your controller loads, and the template fires up, and you're ready to start working with what's changed in that route. AngularJS Critique. A Better Way to Learn AngularJS. Angularjs - how to access the angular $scope variable in browsers console. Angularjs - how to debug angular services in browser.

AngularJS disable partial caching on dev machine. DOM Nodes Leaking · Issue #4864 · angular/angular.js. Introduction to AngularJS. DOM Nodes Leaking · Issue #4864 · angular/angular.js. Google cloud endpoints - AngularJS Load controllers only when parent controller finishes async call. A Practical Guide to AngularJS Directives (Part Two) AngularJS Directives, Using Isolated Scope with Attributes. AngularJS eBook for .NET Developers - Understanding AngularJS Directives Part 2: ngView - Liam Kaufman. Understanding Directives · angular/angular.js Wiki. DOM Nodes Leaking · Issue #4864 · angular/angular.js. Banging Your Head Against an AngularJS Issue? Try This — nathan leclaire | writings on technology and business. Pseudobry. Developer Guide: Bootstrap. Handling Oauth2 with Node.js and Angular.js - Passport to the rescue! : The Personal Blog of Matthew Tyler.

Angularjs found great solution to display AJAX spinner loading widget | Lemoncode. Videogular - An HTML5 video player for AngularJS. AngularJS IndexedDB Demo.


AngularJS Compile Process. AngularJS. AngularJS Cheat Sheet by ProLoser.