Coder Social home page Coder Social logo

mcampster / angular-routing Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dotjem/angular-routing

0.0 2.0 0.0 12.12 MB

Enhanced state based routing for Angular applications!

Home Page: http://dotjem.github.io/angular-routing/

License: MIT License

angular-routing's Introduction

dotJEM Angular Routing Build Status

Latest release v0.6.1:

Latest build (currently not automated, so not 100% the latest always):

The samples and api reference are currently a work in progress:

Version 0.6.1

Inspired by the UI-Router project by Angular-UI, this project came to life as I wanted to provide what I belive is more "true states" where the transitions could be an important part of the implementation.

The UI-Route project can be found here: https://github.com/angular-ui/ui-router

One important note is that this is developed using TypeScript, yet following the basic style of how Angular modules, services and directives is written

Main goal

The goal is to provide a routing concept for Angular that provides a way to seperate views into tiers so that we don't always have to reload the entire main view.

Also I wan't it to support a varaity of page designs, where different types of navigations take place.

Features

  • $routeProvider and $route to replace the existing angular routing concept.
  • $stateProvider and $state to manage application states.
  • $stateTransitionProvider to manage state transitions.
  • $viewProvider and $view to manage view state.
  • jem-view directive as a replacement for ng-view
  • $scroll and jem-anchor directive for scrolling

$routeProvider and $route

Through the $routeProvider and $route, backwards compatibility can be obtained by registering decoraters, this project comes with a module that provides just that.

Aditionally a new concept for parameters is introduced, providing the flexibility to match and convert parameters only if they are numeric, patterns etc. Further more, the ability to extend on this concept by registering new converters or overwriting existing ones.

By default num and regex are available.

Also providing the abilty to switch to a case insensitive mode.

$stateProvider and $state

Provides the means to define application states with views, controllers and more.

$stateProvider will register routes with the $routeProvider if a route property is specified on the state, which is really just a short-hand to registering that route manually.

It can also register specific transitions through the onEnter and onExit properties.

$stateTransitionProvider

Allows the configuration of extra behavior or the ability to change the flow of existing states by registering handlers in great many ways using wildcards, arrays and special {before, between, after} handlers that give a more granulated control over when a handler is called.

Through depending on $transition, $from and $to a transition handler can reject, redirect or modify what happens during a transition.

$viewProvider and $view

$view manages the current state of all views and will support different update schemes.

Requires

  • AngularJS 1.2

Reporting Issues

When encountering issues and posting them under issues here on github, if possible, it will be much apreciated if an example is to follow, it would be especially usefull if the issue was recreated using either http://plnkr.co/ or http://jsfiddle.net/.

Otherwise, try to capture as much detail as possible, the more that is known about the issue and context the easier it is to help.

Here is a template Plunker that can be used: http://plnkr.co/edit/tpl:Q2P6M278icUckKNmZJ7C

angular-routing's People

Contributors

jeme avatar groner avatar grifotv avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.