-
Notifications
You must be signed in to change notification settings - Fork 45
Quick Start First application
Yana edited this page Mar 22, 2016
·
5 revisions
$ npm install -g generator-mcfly
$ mkdir my-new-project && cd $_
$ yo mcfly myapp
Follow instruction, in our sample we will use camelCase (see yo questions)
$ yo mcfly:module common
$ yo mcfly:controller common hello
Add
<h2 ng-controller="main.common.hello as helloCtrl">{{helloCtrl.message}}</h2>
after <script src="scripts/bundle.js"></script>
As you saw, in the last html snippet, we asked for a property called message
in scope of main.common.hello
, let's add it!
Let's add the following code in client/common/controllers/hello.controller.js
, just after vm.controllername = fullname;
:
vm.message = 'Hello World !!!';
$ gulp browsersync
or if you prefer (or have some problem with your default browser...)
$ gulp browsersync --no-browser
Tips: You can change the default browser in gulp_tasks/common/constants.js
. Search for a browser
property.
Navigate to http://localhost:5000
.
If all went well, we should see 'Hello World !!!' in your browser.