Created
April 8, 2015 14:52
-
-
Save F1LT3R/e1e32abcd89e97adf75c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| var app = angular.module('app.directives.myModule', []); | |
| app.directive('myModule', [function () { return { | |
| restrict: 'E', | |
| scope: { | |
| thingsA: '=', | |
| thingsB: '=', | |
| }, | |
| controller: ['$scope', function ($scope) { | |
| $scope.$watch(function(onlyWhatChangedPlease){ | |
| // Logs whole $scope when only making changes to: thingsB | |
| console.log(onlyWhatChangedPlease); | |
| }); | |
| }], | |
| template: '<div>{{things}}</div>' | |
| }}]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment