I want to add a search form in all views, and instead of duplicating the code, I want just to call the template file.
I created template file called: search-form.html
and defined the following views on the app.js on the routes:
.state('home', {
url: "/",
views: {
'mainContent' :{
controller: 'CategoriesController',
templateUrl: "templates/categories.html",
},
'leftSideMenu': {
templateUrl : "templates/sidemenu.html",
},
'searchForm': {
templateUrl : "templates/search-form.html",
}
}
})
and when I try to call: inside the main templates, it renders nothing.