npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

angular-ux

v0.0.2

Published

Angular UX is a library that helps you create live, navigable prototypes with the help of AngularJS but without having to learn how to code ;). **DESIGNERS, I'm looking at you!**

Downloads

2

Readme

angular-ux

Angular UX is a library that helps you create live, navigable prototypes with the help of AngularJS but without having to learn how to code ;). DESIGNERS, I'm looking at you!

Key features

  • Helps you create live, navigable prototypes
  • It's intended for designers, not coders
  • No need to code a single line of JS.

Installing it

You have several options:

bower install angular-ux
npm install angular-ux
<script type="text/javascript" src="https://rawgit.com/mgonto/angular-ux/master/dist/angular-ux.js"></script>

Configuring it

Setting up our prototype app

The first thing we need to do is setup a new index.html which will be the point of entry for our app. Besides linking to the specific CSS and JS files we need for our prototype, we always need to reference jQuery, angular.js, angular-animate and angular-ux in that order.

We also need some way of serving the directory where the index.html and the other files will reside. For that, we can use npm command serve or python -M SimpleHTTPServer

Setting up the Angular application

Now, we need to setup the Angular application. This will be the only javascript we need to code to have our prototype running. The good thing is that it’s just copy and paste ;).

<body ng-app=“prototype” ng-ctrl=“MainCtrl”>
</body>
// app.js
angular.module(‘prototype’, [‘ngAnimate’, ‘ux’])
  .controller(‘MainCtrl’, function($scope) {
    $scope.data = {};
  });

Usage / Features

Navigating through different pages

The first thing all prototypes need is the ability to navigate through different pages. For this, we can use the ux-page directive.

<body>
  <ux-page name=“Home” home>
    <ng-include src=“’home.html’”></ng-include>
  </ux-page>
  <ux-page name=“Details”>
    <ng-include src=“’detail.html’”></ng-include>
  </ux-page>
</body>
<!-- home.html -->
<!-- ... -->
<a href=“” ux-go=“Details”>Go to Details page</a>

In this case, we’re creating 2 different pages. The content of each of those pages are in separate files which we’re including using the ng-include directive. Note that we added the home attribute to the ux-page that will be the main one (displayed by default).

Then, in the home.html, we have a link that navigates the user to the Details page. For that, we’re using the ux-go directive with the name of the page that we want to browse to.

Note: It’s important to note that you must put the href=“” in the link so that it’s clickable.

Theming

When you’re prototyping you want to try different themes (colors, typographies, sizes, etc.) at the same time to see which one works better. For that, you can use a the ux-themeable feature from angular-ux:

<div class=“content” ux-themeable>
  <h1>Title</h1>
  <p>This is some text</p>
</div>

First you need to add the ux-themeable directive to the parent HTML element that you want to theme. Then, to change themes, you need to specify the theme name as a query parameter in the prototype URL. For example, if you go to http://localhost:3000/#/?page=Details&uxTheme=option1, the div.content will end up having an additional class named option1 which means we can style it as follows:

div.content.option1 h1 {
  font-size: 38px;
}

div.content.option1 p {
  color: red
}

Alternatively, you can set the query parameter to use for this ux-themeable as follows:

<div class=“content” ux-themeable="contentTheme">
  <h1>Title</h1>
  <p>This is some text</p>
</div>

Then, the URL to add option1 class to div.content would be http://localhost:3000/#/?page=Details&ucontentTheme=option1

Examples

You can see a live example in the example folder.

To start the sample, just run serve or python -M SimpleHTTPServer on the repository root and then go to http://localhost:3000/example/

License

MIT