Skip to content

previousdeveloper/ionic-best-structure

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
 ```

About

Clean code for ionic project.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published