Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <button type="button" class="btn btn-primary" ng-click="$ctrl.showCode()">Test Code</button>
- <button type="button" class="btn btn-primary" ng-click="$ctrl.clearCode()">Reset All</button>
- {{$ctrl.codeShow}}
- angular.
- module('phonecatApp').
- component('testCode', {
- templateUrl: 'Components/test-code/test-code.template.html',
- controller: [function TestCodeController() {
- var self = this;
- self.code = '';
- self.codeShow = '';
- self.showCode = function showCode()
- {
- self.codeShow = self.code;
- }
- self.clearCode = function clearCode()
- {
- self.codeShow = '';
- self.code = '';
- }
- }]
- });
Add Comment
Please, Sign In to add comment