Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
fix(): Fixed issue with
Browse files Browse the repository at this point in the history
  • Loading branch information
hafstad committed Jul 21, 2016
1 parent e382e97 commit 8ae87cb
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
4 changes: 3 additions & 1 deletion dist/component.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/component.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/component.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/component.min.js.map

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,8 @@ <h1>Demo - nReplaceWidthValidation</h1>

<script>
(function() {

angular.module('demoApp', ['nReplaceWithValidation']).config(function(nReplaceWithValidationConfigProvider) {
console.log('yiir', nReplaceWithValidationConfigProvider);
});

angular
.module('demoApp')
.module('demoApp', ['nReplaceWithValidation'])
.controller('demoController', function() {
var vm = this;

Expand All @@ -100,7 +95,6 @@ <h1>Demo - nReplaceWidthValidation</h1>
vm.messages = {
required: 'This is a custom required message',
minlength: 'This is a custom minLength message',
//blacklisted: 'This is a custom blacklist message',
fallback: 'Please contact support <a href="https://support.google.com/">contact@support.com</a>'
};
vm.submit = submit;
Expand Down
6 changes: 4 additions & 2 deletions src/nReplaceWithValidation.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ namespace nReplaceWithValidation {

// HTML support
for(let message in this.messages) {
this.messages[message] = this.$sce.trustAsHtml(this.messages[message]);
if(typeof this.messages[message] === 'string') {
this.messages[message] = this.$sce.trustAsHtml(this.messages[message]);
}
}

// Make sure all needed messages exists in this.messages otherwise create fallback
let self = this;
this.$scope.$watchCollection('nReplaceWithValidation.input.$validators', (newValue) => {
Expand Down

0 comments on commit 8ae87cb

Please sign in to comment.