I have a simple angular project structure
app
index.html
view
main.html
home.html
landingPage.html
Index.html looks like
<body ng-app="myApp">
<div ui-view>
</div>
</body>
App.js file looks like
$urlRouterProvider.otherwise('/landingPage');
$stateProvider.state('landingPage', {
url: '/landingPage',
abtract: true,
templateUrl: 'view/landingPage.html'
})
.state('landingPage.home', {
url: '/home',
templateUrl: 'view/home.html'
}).state('landingPage.main', {
url: '/main',
templateUrl: 'view/main.html'
});;
and landing page looks like
<header></header>
<div>
<div ui-view>
</div>
</div>
When I run the app I see the header correctly but do not see the home.html content. How do I make home.html default every time?
As you can see I have abstract true but that does not work. I also tried ng-include which works but gets error TypeError: Cannot read property 'insertBefore' of null
sample plunker HOME should have been displayed on running but nothing shows