Open mtpultz opened 8 years ago
Seems to work if I just do this instead:
(function () {
'use strict';
function routes($stateProvider) {
$stateProvider
.state('menu.auth', {
name: 'auth',
url: '/auth',
component: 'authPage' // authentication page is now loaded
});
}
routes.$inject = [
'$stateProvider'
];
angular
.module('app')
.config(routes);
})();
(function () {
'use strict';
function routes($stateProvider) {
$stateProvider
.state('menu', {
name: 'menu',
component: 'menuPage', // menu and surround template are loaded
url: '/main',
abstract: true
});
}
routes.$inject = [
'$stateProvider'
];
angular
.module('app')
.config(routes);
})();
(function () {
'use strict';
function routes($stateProvider) {
$stateProvider
.state('menu.auth', {
name: 'auth',
url: '/auth',
views: {
'content@': {
component: 'authPage' // authentication page is not loaded within the content area
}
}
});
}
routes.$inject = [
'$stateProvider'
];
angular
.module('app')
.config(routes);
})(); [- [ ] *`### ~~> [ - [ ] ]()~~`**]()
Using the views example content isn't loaded. The menu template is displayed, but no content appears where the view should be displayed. I just found this decorator, and it seemed to work after porting the routes to look like the example, but not within nested views. Was super happy to find this since Ionic won't be updating the router in v1.3.1 holding it at v0.2.x.