Commit 8586ba494bd40a4bb486c8e87e1b4fe5ff10f655
1 parent
0d7cf45ece
Exists in
master
and in
1 other branch
html5 mode
Showing
2 changed files
with
35 additions
and
8 deletions
Show diff stats
index.html
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | |
6 | 6 | <head> |
7 | 7 | <meta charset="utf-8"> |
8 | + <base href="/"> | |
8 | 9 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
9 | 10 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
10 | 11 | <title>Startup Jalsa</title> |
... | ... | @@ -39,6 +40,7 @@ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], |
39 | 40 | j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= |
40 | 41 | 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); |
41 | 42 | })(window,document,'script','dataLayer','GTM-WBTNXZB');</script> |
43 | + | |
42 | 44 | <!-- End Google Tag Manager --> |
43 | 45 | <!-- <script> |
44 | 46 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | ... | ... |
script.js
... | ... | @@ -3,6 +3,29 @@ |
3 | 3 | |
4 | 4 | // configure our routes |
5 | 5 | scotchApp.config(function($routeProvider,$locationProvider) { |
6 | + | |
7 | + // [system.webServer] | |
8 | + // [rewrite] | |
9 | + // [rules] | |
10 | + // [rule name="scotchApp" stopProcessing="true"] | |
11 | + // [match url=".*" /] | |
12 | + // [conditions logicalGrouping="MatchAll"] | |
13 | + // [add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /] | |
14 | + // [add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /] | |
15 | + // [add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /] | |
16 | + // [/conditions] | |
17 | + // [action type="Rewrite" url="/index.html" /] | |
18 | + // [/rule] | |
19 | + // [/rules] | |
20 | + // [/rewrite] | |
21 | + // [/system.webServer] | |
22 | + | |
23 | + // use the HTML5 History API | |
24 | + $locationProvider.html5Mode({ | |
25 | + enabled: true, | |
26 | + requireBase: false | |
27 | + }); | |
28 | + $locationProvider.hashPrefix('!'); | |
6 | 29 | $routeProvider |
7 | 30 | |
8 | 31 | // route for the Home page |
... | ... | @@ -29,11 +52,11 @@ |
29 | 52 | controller: 'registrationController' |
30 | 53 | }) |
31 | 54 | |
32 | - // route for the ambassador page | |
33 | - // .when('/startupJalsaPromocode', { | |
34 | - // templateUrl: 'pages/ambassador.html', | |
35 | - // controller: 'ambassadorController' | |
36 | - // }) | |
55 | + //route for the ambassador page | |
56 | + .when('/startupJalsaPromocode', { | |
57 | + templateUrl: 'pages/ambassador.html', | |
58 | + controller: 'ambassadorController' | |
59 | + }) | |
37 | 60 | |
38 | 61 | // route for the confirmation page |
39 | 62 | .when('/confirmation', { |
... | ... | @@ -41,9 +64,11 @@ |
41 | 64 | controller: 'registrationController' |
42 | 65 | }) |
43 | 66 | |
44 | - // use the HTML5 History API | |
45 | - // $locationProvider.html5Mode(true); | |
46 | - // $routeProvider.otherwise({ redirectTo: '' }); | |
67 | + .otherwise({ | |
68 | + redirectTo: '/' | |
69 | + }); | |
70 | + | |
71 | + | |
47 | 72 | |
48 | 73 | }); |
49 | 74 | ... | ... |