Installation
Either install via bower
or download it
bower install --save mobile-angular-ui
Using the boilerplate
If you want to have your Mobile Angular UI project bootstrapped in a minute you can use thegenerator-mobileangularui
generator for Yeoman.
npm install -g bower yo gulp generator-mobileangularui
Using the generator is super-easy and fast
mkdir myApp
cd myApp
yo mobileangularui
You can find a complete tutorial to start a Phonegap project with mobile-angular-ui here.
Initial Setup
You can initialize your Angular application declaring mobile-angular-ui
as a dependence.
angular.module('myApp', ["mobile-angular-ui"]);
Here is a more complete example including ngRoute:
angular.module('myApp', [
"ngRoute",
"mobile-angular-ui",
]).config(function($routeProvider) {
$routeProvider.when('/', {
// ...
});
// ...
});
If you wish you can avoid to load whole mobile-angular-ui
modules at all and pick a subset of the loaded modules to fit your needs. This is how the mobile-angular-ui
module is defined with its dependencies.
angular.module('mobile-angular-ui', [
'mobile-angular-ui.core.activeLinks', /* adds .active class to current links */
'mobile-angular-ui.core.fastclick', /* polyfills overflow: auto */
'mobile-angular-ui.core.sharedState', /* SharedState service and directives */
'mobile-angular-ui.core.outerClick', /* outerClick directives */
'mobile-angular-ui.components.modals', /* modals and overlays */
'mobile-angular-ui.components.switch', /* switch form input */
'mobile-angular-ui.components.sidebars', /* sidebars */
'mobile-angular-ui.components.scrollable', /* uiScrollable directives */
'mobile-angular-ui.components.capture', /* uiYieldTo and uiContentFor directives */
'mobile-angular-ui.components.navbars' /* navbars */
]);