background preloader

Angular directives for Twitter's Bootstrap

Angular directives for Twitter's Bootstrap
The $uibPosition service provides a set of DOM utilities used internally to absolute-position an element in relation to another element (tooltips, popovers, typeaheads etc...). getRawNode(element) Takes a jQuery/jqLite element and converts it to a raw DOM element. parameters element(Type: object) - The element to convert. returns (Type: element) - A raw DOM element. parseStyle(element) Parses a numeric style value to a number. value(Type: string) - The style value to parse. (Type: number) - The numeric value of the style property. offsetParent(element) Gets the closest positioned ancestor. element(Type: element) - The element to get the offset parent for. (Type: element) - The closest positioned ancestor. scrollbarWidth(isBody) Calculates the browser scrollbar width and caches the result for future calls. isBody(Type: boolean, Default: false, optional) - Is the requested scrollbar width for the body/html element. (Type: number) - The width of the browser scrollbar. position(element, includeMargins)

AngularUI for AngularJS 21 Useful Workflow Tools for AngularJS Developers These days, AngularJS is one of the most popular technologies around the web. It has simplified web application development to a great extent. Currently, it is a popular name buzzing in the community of developers and technology enthusiasts. With AngularJS, one can build a variety of web applications and websites. You can also look upon “Free Ebooks to learn AngularJS” to start development in this technology. AngularJS applications can also be integrated in to an existing system or project. AngularJS Frameworks 1) Ionic Ionic is an open-source, front-end framework for developing mobile applications with HTML, CSS and JavaScript. 2) Supersonic Supersonic is a front-end framework for developing data-driven hybrid apps and cool user interfaces for mobile devices. 3) LumX Lumx is a responsive front-end framework based on AngularJS and Google Material Design guidelines. 4) Radian Radian is an Angular JS framework ideal for working on multiple development projects. 5) Mobile Angular UI 7) CodePen

Foundation: HTML Templates News or Magazine This template puts a focus on bold images, perfect for a magazine style site with eye catching content. Your stories are easy to find with large feature blocks. See Demo Real Estate or Travel Big thumbnails with a space for captions and descriptions along with an informative header make this the perfect template for real estate or hotel booking. See Demo Ecommerce Homepage Building an online store? See Demo Agency Bring your work to the forefront with this sleek template that's perfect for agencies or freelancers. See Demo Blog w/ Sidebar Large images, an easy to navigate layout, and versatile sidebar will help you get your blog up and running. See Demo Blog Single Column This sleek, minimal approach can help your blog stand out by putting content front and center. See Demo Portfolio Show off your work and highlight what you do with this grid style thumbnail layout. See Demo Product Page Highlight your new product and educate potential customers with this classic template. See Demo

Devers : Variable templates for an AngularJS directive Sometimes web services and APIs return different data sets for the same type of object. For example, the tumblr API will return a list of posts, but each post type has different data associated with it: text posts have a title and body, while photo posts have captions and images. Since having different components and directives for each post type doesn't make much sense (especially when they're all displayed in one stream, as on tumblr), it's beneficial to be able to conditionally load a template based on the post type of each individual post. This code is based on these two articles/posts: and here is the tumblr API for reference: components.js news.html (all posts view) text.html (tumblr text post component) video.html (tumblr video post component, for comparison)

Yeoman - Modern workflows for modern webapps WebGL Lesson 1 – A triangle and a square << Lesson 0Lesson 2 >> Welcome to my first WebGL tutorial! This first lesson is based on number 2 in the NeHe OpenGL tutorials, which are a popular way of learning 3D graphics for game development. Here’s what the lesson looks like when run on a browser that supports WebGL: Click here and you’ll see the live WebGL version, if you’ve got a browser that supports it; here’s how to get one if you don’t. More on how it all works below… A quick warning: These lessons are targeted at people with a reasonable amount of programming knowledge, but no real experience in 3D graphics; the aim is to get you up and running, with a good understanding of what’s going on in the code, so that you can start producing your own 3D Web pages as quickly as possible. There are two ways you can get the code for this example; just “View Source” while you’re looking at the live version, or if you use GitHub, you can clone it (and future lessons) from the repository there. You’ll see the following HTML code: Next: . .

Free Bootstrap templates and premimum templates marketplace. AngularJS and Play Framework - Matthias Nehlsen I felt a sudden urge to write a chat application during Scala Days. Writing the server side code in Scala was fun and only took like 30 minutes. The JavaScript part was not nearly as gratifying. Changing the client to AngularJS over the last couple of days allowed me to reclaim client side development joy. UPDATE 06/27/2013: Here is how it looks like. The source is on GitHub. There should be actors randomly reciting Romeo and Juliet in Room 1 above if everything worked, but that’s not our problem right now. I challenged myself to write a chat server for this purpose, with 10 lines of code on the server side (or less). What happens here is fairly straightforward once we look at the drawing: The Concurrent object is the central information hub which provides us with a channel to push JSON into. What is an Iteratee? Enumeratees are adapters between Enumerators and Iteratees. Let’s visualize this: I wrote an initial version using jQuery to manipulate the DOM.

Grunt: The JavaScript Task Runner Executing Jasmine Tests in Play 2.0.4 - Pere Villega Christmas break is over, and on a whim I started to check AngularJs. If you haven’t tested it yet, do it. I’ve toyed around with Backbone and some other Javascript single page app frameworks, and Angular is by far the one that I liked the most. It has simplicity embedded in its core, and turning tedious tasks (as setting controllers) into something trivial makes it a pleasure to use. Simplicity. Such an important concept, and one which is seldom present in frameworks. But I digress. So we have a Javascript framework, and obviously we want to test it. It is on moments like this when Open Source shows its worthiness. Well, to be honest it wasn’t so simple, that’s why I decided to document it here to save time to other interested people. Integrating Sbt-Jasmine This is quite straightforward, you just need to follow the instructions from the Sbt-Jasmine page. This will load the plugin directly from Github into your project. Adding Jasmine as part of your test cycle The final code looks like:

JavaScript Code Smells In the past I've given presentations, recorded videos, and written blog posts about fixing common JavaScript and jQuery bugs. This is a good skill to have, but what about working code? Fixing broken code is important, but have you ever gotten into the situation where your code works, but it doesn't feel quite right... maybe even smells? "A code smell is a surface indication that usually corresponds to a deeper problem in the system" --CodeSmell by Martin Fowler As we grow as developers we strive to write more maintainable code, but on our journey we often times don't know what that looks like yet. Your JavaScript may pass stardard JSHint rules, but that doesn't mean it's legit. Most developers can smell brittle and fragile code a mile away, but it takes time and training to combat against these smells. Video The following video was recorded this year at FluentConf. Types of Smells The following are the types of smells that I cover throughout the presentation. Slides

Related: