Created
October 30, 2017 14:20
-
-
Save sheryarshirazi/0d2cb1d52e774df848a0fbe4e64622f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// directive JS | |
(function() { | |
'use strict'; | |
angular | |
.module('app') | |
.directive('oneWayBind', oneWayBind); | |
oneWayBind.$inject = []; | |
function oneWayBind() { | |
return { | |
scope: { | |
owb: '=' | |
}, | |
template: "{{owb || 'N/A'}}" | |
}; | |
} | |
})(); | |
// Directive HTML | |
<p one-way-bind owb="::scopeValue"></p> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment