Created
September 29, 2015 14:30
-
-
Save williankeller/5769a5cce16d3f80aab7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var ex = { | |
| p: '.phtml', | |
| h: '.html' | |
| }; | |
| var url = { | |
| a: '/', | |
| b: '/signin', | |
| c: '/signup', | |
| x: '.phtml' | |
| }; | |
| var path = { | |
| views: 'system/views/', | |
| models: 'system/model/', | |
| controllers: 'system/controllers/' | |
| }; | |
| angular.module('obm', []) | |
| .config(['$routeProvider', function ($routeProvider, $locationProvider) { | |
| $routeProvider | |
| .when(url.a, { | |
| templateUrl: path.views + 'lists' + ex.h, | |
| controller: ListCtrl | |
| }) | |
| .when(url.b, { | |
| templateUrl: path.views + 'access' + url.b + ex.p, | |
| controller: AddCtrl | |
| }) | |
| .when(url.c, { | |
| templateUrl: path.views + 'access' + url.c + ex.p, | |
| controller: EditCtrl | |
| }) | |
| .otherwise({ | |
| redirectTo: '/' | |
| }); | |
| //$locationProvider.html5Mode(true); | |
| }]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment