Closed cristianounix closed 7 years ago
@fredericojesus, so... can i do that in app.config.js
angular
.module('app')
.config(function ($stateProvider, $urlRouterProvider, $httpProvider) {
$httpProvider.interceptors.push('authInterceptor');
$urlRouterProvider.otherwise('/home');
$stateProvider
.state({
name: 'dumps',
url: '/dumps',
templateUrl: './pages/dumps/list.html',
controller: 'dumpsPageController'
});
})
.config(configure);
function configure($mdIconProvider) {
$mdIconProvider
.iconSet('navigation', '/src/images/material-design-icons/navigation-icons.svg', 24)
.iconSet('action', '/src/images/material-design-icons/action-icons.svg', 24)
.iconSet('content', '/src/images/material-design-icons/content-icons.svg', 24);
}
Would it be a good practice? or have you a better method ?
Thanks man !
If you have a lot of configs to do and a lot of routes it's better to keep them in separate files, in order to make things better organized. But if you're making just a simple application that's OK.
Your welcome! :D
Can you write an a example of route in this project ?
OK, I'll try to do it if I have some time.
Done! I added ui-router and a route example, now you can navigate in the items and shopping list options in the nav bar. (see last commit if you want to see the changes I made) I had to also add connect-modrite to the gulp serve file so that we don't have to use the routes like /#/items but rather just /items. So you will have to run npm install and bower install again.
can you show a example ?