Reputation: 9825
I'm trying to have two different templates loaded into a ui-view
, depending on the state. The problem is that when I go to either of the states (coupon.form
and coupons.login
) neither of them populate coupon
's ui-view
. What am I doing wrong?
angular.module('couponGeneratorApp')
.config(function ($stateProvider) {
$stateProvider
.state('coupons', {
abstract: true,
url: '/generate-coupons',
template: '</ui-view>'
})
.state('coupons.form', {
url: '',
template: '<h1> HELLO FORM </h1>'
})
.state('coupons.login', {
url: '',
template: '<h1> HELLO LOGIN</h1>'
});
});
Upvotes: 0
Views: 136
Reputation: 146
The template in the 'coupons' state should be '<ui-view />'
, not '</ui-view>'
Upvotes: 1