I am new in mean stack and i am creating module.
My module is not working properly,some time it works and some time not.
I dont understand what i am doing wrong.
packages/custom/settings/public/routes/settings.js
‘use strict’;
//Setting up route
angular.module(‘mean.settings’).config([‘$stateProvider’,
function($stateProvider) {
// states for my app
$stateProvider
.state(‘all settings’, {
url: ‘/settings’,
templateUrl: ‘/settings/views/list.html’,
});
}
]);
packages/custom/settings/public/controllers/settings.js
‘use strict’;
angular.module(‘mean.settings’).controller(‘SettingsController’, [‘$scope’, ‘$stateParams’, ‘$location’, ‘Global’, ‘Settings’,
function($scope, $stateParams, $location, Global, Settings) {
$scope.global = Global;
$scope.find = function() {
Settings.query(function(settings) {
$scope.settings = settings;
});
};
}
]);
packages/custom/settings/public/views/list.html
-
Hello
{
{setting.Name}}
No settings yet.
Why don’t you
Create One
?