angular-data.js is the full data store that supports collections and communicating with persistence layers. angular-cache.js is a simple key-value store and an api-compatible replacement for $cacheFactory with advanced caching capabilities. Use one, or the other, or use both and angular-data will be able to take advantage of some of the features of angular-cache.
AngularJS two way data-binding is at the same time a great strength and its Achilles heel. Dealing with complex and/or large collections of items can significantly slow down rendering. We started looking for a solution to this problem and stumbled upon things like Thierry Nicola's post about his use of React to improve AngularJS rendering time.
In order to create a single page application with good perceived latency and good user experience, the SPA engine must handle the browser native behavior in many aspects, for instance:
SEO & Bookmarkability: Sharing or bookmarking a link should always display the same content. Sending a link to a friend should get them where we were. More than that, search engines are able to index that same content.
Hybrid rendering: Ajax + server-side rendering allows disable pushState at any time, allowing progressive enhancement. The way you render the server side doesn't matter, it can be simple HTML fragments or even template views.
State retention: Scrolling, reloading or navigating through the history of the page should get back to where it was.
UI feedback: When some content is requested, it indicates to the user that something is happening.
Pending navigations: Block UI rendering until data is loaded, then displays the content at once. It's important to give some UX feedback during loading.
Timeout detection: Timeout if the request takes too long to load or when navigate to a different link while another request is pending.
History navigation: By using History API you can manipulate the browser history, so you can use browser's back & forward buttons.
Cacheable screens: Once you load a certain surface this content is cached in memory and is retrieved later on without any additional request. This can speed up a lot your application.
Page resources management: Evaluate scripts and stylesheets from dynamic loaded resources.
1: Access Scopes 2: Inspect the Scope Tree 3: Grab any Services 4: Access controller for directive 5: Chrome Console Features 6: Conclusion
Here is what we will cover:
* Starting The Sails Project * Sails Server-Side Views * Adding dependencies * Angular Controllers * Sails Models * Syncing With The Server
Aside from ability to extend HTML easily AngularJS also offers a simple way to interact with external APIs. In this tutorial I will show you how to use Services to access GitHub's API and create a simple repository browser.
13 Static Site Generators to Help You Build Your Ultimate Website Mashable DocPad is a static website generator built on Node.js and Express.js, that empowers your website with layouts, pre-processors, querying and a robust plugin system.
In the past we’ve gone over how to use the great UI-Router for creating AngularJS applications. It provides great flexibility and power when defining states and nested states in your application. Today we’ll be going over three features that UI-Router provides that you might find useful when building your own applications.
Before we take dive in, if you need a quick overview of UI-Router, take a look at our starter guide and an example of UI-Router in action in a multi-step form.
Overview Single page apps are becoming increasingly popular. Sites that mimic the single page app behavior are able to provide the feel of a phone/tablet application. Angular helps to create applications like this easily.
I started by reading the documentation at the Github page of the Selenium-Nightwatch project and tried to install the package according to following instructions from the author. This is where my problems begun, since author stressed that it is required to run meteor with administrator privileges, what completely messed up build of all my packages and from this moment on I had to run all my meteor projects with administrator privileges. I shrieked in horror.
Many large Angular applications tend to see a lot of repetition - same API endpoint, same method of dealing with and transforming data, etcetera. One technique you can use to at least alleviate that is using AngularJS's decorate method, which allows you to extend, adjust or even fully replace any existing service.
As you'll see in this post, using this allows you to modify and extend the framework you build your app in, which will lead to a cleaner, more legible codebase, written in a more functional style (the what, not the how).