https://github.com/devbyray/angularjs-first-setup
Demo code for a first setup of an AngularJS application
https://github.com/devbyray/angularjs-first-setup
Last synced: 20 days ago
JSON representation
Demo code for a first setup of an AngularJS application
- Host: GitHub
- URL: https://github.com/devbyray/angularjs-first-setup
- Owner: devbyray
- Created: 2015-04-24T09:42:44.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-24T10:00:24.000Z (about 11 years ago)
- Last Synced: 2025-01-12T10:11:55.530Z (over 1 year ago)
- Language: CSS
- Homepage: http://codepen.io/rsschouwenaar/pen/QbWoRv
- Size: 199 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Angular Setup
## Project structure:
- app
- src
- js
- libs
- angular.min.js
- app.js
-sass
- sass-structure
- index.html
- gulpfile.js
- package.json
- readme.md
## How to install
1. run `(sudo) npm install`
2. run `gulp`
3. Then the browser will start.
## How to start an AngularJS app
In this example I already did the setup. But the most important things to do is:
1. Include the angular.js file & app.js file in the html (on the bottom of the page) ``. But i prefer to concat all the .js files into 1 file. So that's why the index.html file only include app.js.
2. In the html replace the `` with `` to let Angular know that this is the Angular Root element.
3. Then in your html place the following expression: `1 + 2 = {{ 1 + 2 }}`. When AngularJS is loaded, it will do the math for you. [demo](http://codepen.io/rsschouwenaar/pen/QbWoRv)
4. In the app.js place this code to begin the application:
`var app = angular.module("app", []);`