Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 1.14 KB

README.md

File metadata and controls

72 lines (53 loc) · 1.14 KB

ionic-best-template

  • Define 1 component per file.

The following example defines the app module and its dependencies, defines a controller, and defines a factory all in the same file.

/* recommended */

// app.module.js
angular
    .module('app', ['ngRoute']);
/* recommended */

// ChatDetailCtrl.js
angular
    .module('app')
    .controller('ChatDetailCtrl', ChatDetailCtrl);

function ChatDetailCtrl() { }
/* recommended */

// someFactory.js
angular
    .module('app')
    .factory('Chats', chatDetailService);

function chatDetailService() { }

###Separate file structure

 ```

/www /js /account /controller /account.controller.js /service /account.service.js /config.js index.html ```

##For browser
 ```
$ ionic serve
```

##For android
```
$ ionic platform add android
$ ionic build android
$ ionic emulate android
```

##For ios
```
$ ionic platform add ios
$ ionic build ios
$ ionic emulate ios
 ```