Open zeeshanjan82 opened 9 years ago
After analyzing I found that the reason is this error
humanizeDuration is not defined
However I have installed it and referenced it . I am using system.js and jspm
+1
Well, I'm using controllerAs and the timer render right, but when I trying to set countdown attribute with a variable then the timer is not rendered.`
<timer interval="1000" countdown="timeLimit">{{countdown}} segundos</timer>
.config(function($stateProvider) {
$stateProvider.state('state.name', {
url: '/{id:[0-9]+}/preview',
views: {
"form": {
controller: 'previewCtrl',
templateUrl: 'template-path.tpl.html',
controllerAs: 'vm'
}
}
});
})
.controller('previewCtrl', PreviewCtrl);
function PreviewCtrl() {
/* jshint validthis: true */
var vm = this;
vm.timeLimit = 20;
}
According to the readme the module humanize-duration
is required.
https://github.com/EvanHahn/HumanizeDuration.js
For me the timer is not working, I am using Controller As syntax and I do not see the timer working even what I have imported the angular-timer module along with humanize-duration. The hours, minutes and seconds are not even rendered. Is there any special consideration for using Controller As syntax?