I'm currently working on an AngularJS application with two templates that are used across 100 different pages.
Instead of creating separate static template files for each page, I prefer to use dynamic content within the templates. What would be the best way to achieve this in AngularJS?
My current approach involves including content directly in the controller, but as the number of pages increases, maintaining and readability become challenging. How can I improve this?
angular.module('app.controllers', [])
.controller('AppCtrl', function ($scope, $stateParams, $location, $ionicScrollDelegate) {
$scope.data = [
{
'name': 'test',
'data': 'test'
},
{
'name': 'test',
'data': 'test'
},
{
'name': 'test',
'data': 'test'
},
{
'name': 'test',
'data': 'test'
},
{
'name': 'test',
'data': 'test'
}
];
});