Angularjs simple front-end apps using ui-router

Angularjs is flexible for Single Page Application(SPA). This post explains you that how we can perform navigating between one view to another view using ui-router module and Bootstrap for layouts. Please go to this post If you are interested this demo using ngRoute module.

Sample:

http://www.amasik.com/demo/angularjs/front-end-ui-router/index.html

Module Source: http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js

Dependent Module: ui.router

Router Provider:

Default View Config:

Router Config:

View Directive: ui-view

Templates: Used In-line templates home.html, projects.html..etc., (Refer code)

Link Directive : ui-sref=”home”  (here ‘home’ is a state, not url)

Full Source:

HTML

JS

 

1 Comment

  1. Really very good explanation with example

Leave a Reply

Your email address will not be published.

*

Are you humn? *

© 2017 Asik Blog

Theme by Anders NorenUp ↑