Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @scripts.jade
- --
- script(src="./vendor/jquery/dist/jquery.js")
- script(src="./vendor/angular/angular.js")
- script(src="./vendor/angular-resource/angular-resource.js")
- script(src="./vendor/angular-route/angular-route.js")
- script(src="./app/app.js")
- @scripts.html
- --
- <!DOCTYPE html><script src="/vendor/jquery/dist/jquery.js"></script><script src="/vendor/angular/angular.js"></script><script src="/vendor/angular-resource/angular-resource.js"></script><script src="/vendor/angular-route/angular-route.js"></script><script src="/app/app.js"></script>
- @layout.jade
- --
- doctype
- html
- head
- link(href="/favicon.ico", rel="shortcut icon", type="image/x-icon")
- link(rel="stylesheet", href="/css/bootstrap.css")
- link(rel="stylesheet", href="/vendor/toastr/toastr.css")
- link(rel="stylesheet", href="/css/site.css")
- body(ng-app='app')
- block main-content
- include scripts
- PS.: I changed the code below @app.js:
- angular.module('app',['ngResource','ngRoute']);
- angular.module('app').config(function($routeProvider,$locationProvider){
- $locationProvider.html5Mode({ //It was just: $locationProvider.html5Mode(true);
- enabled: true,
- requireBase: false
- });
- $routeProvider
- .when('/',{templateUrl:'/partials/main',controller:'mainCtrl'});
- });
- angular.module('app').controller('mainCtrl',function($scope){
- $scope.myVar = "Hello Angular";
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement