Skip to content

Instantly share code, notes, and snippets.

@didyhu
Last active February 1, 2016 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save didyhu/ba06d74e24d6f97e281e to your computer and use it in GitHub Desktop.
Save didyhu/ba06d74e24d6f97e281e to your computer and use it in GitHub Desktop.
angular
{
"directory": "src/main/webapp/bower_components"
}
//app.js
"use strict"
+function ($, angular) {
angular.module("myApp", ["ngRoute", "toastr"])
.config(function ($routeProvider) {
$routeProvider
.when("/", {templateUrl: 'templates/index.html', controller: "IndexController"})
})
.controller("IndexController", function ($scope, $location, $http, $route, $routeParams, toastr) {
})
}(window.jQuery, window.angular);
bower install --save bootstrap fontawesome angular-route angular-toastr
{
"name": "name",
"authors": [
"author"
],
"description": "",
"main": "",
"moduleType": [],
"license": "MIT",
"homepage": "",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"bootstrap": "~3.3.6",
"font-awesome": "fontawesome#~4.5.0",
"angular-route": "~1.4.9",
"angular-toastr": "~1.6.0"
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Untitled</title>
<link href="bower_components/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="bower_components/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href="bower_components/angular-toastr/dist/angular-toastr.min.css" rel="stylesheet" type="text/css">
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/angular/angular.min.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<script src="bower_components/angular-toastr/dist/angular-toastr.min.js"></script>
<script src="bower_components/angular-toastr/dist/angular-toastr.tpls.min.js"></script>
</head>
<body>
<div ng-app="myApp" ng-view></div>
<script src="someother.js"></script>
<script>
angular.module("myApp", ["myApp.someother"])
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment