Skip to content

Instantly share code, notes, and snippets.

@warlock
Last active June 30, 2017 16:20
Show Gist options
  • Save warlock/d3845faa991621fdb2657d5f635a57e0 to your computer and use it in GitHub Desktop.
Save warlock/d3845faa991621fdb2657d5f635a57e0 to your computer and use it in GitHub Desktop.
Angular 1.5 Client (angular-1.5-cli -g is gen)
/* ANGULAR 1.5 CLIENT BASIC COMANDS
gen -h => help
gen new project_name => make new project
gen -c component_name => make new component
npm start => run development server
npm run build => build distribution bundle
*/
/* COMPONENT HTML
<h1 id="ar"><span ng-click="homeController.funcio()">{{homeController.name}}</span> world! </h1>
<input type="text" ng-model="homeController.name">
*/
// COMPONENT CONTROLLER
class homeController {
constructor() {
this.name = 'hello';
}
funcio() {
this.name ="bye"
}
}
export default homeController;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment