File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html ng-app ="demoApp ">
3+ < head >
4+ < script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.0-rc.2/angular.min.js "> </ script >
5+ < script src ="demo-angular.js "> </ script >
6+ </ head >
7+ < body >
8+ < h2 > Todo</ h2 >
9+ < div ng-controller ="DemoController as demo ">
10+ < form ng-submit ="demo.triggerCrash() ">
11+ < input type ="text " ng-model ="demo.customText " size ="30 "
12+ placeholder ="add custom text here ">
13+ < input class ="btn-primary " type ="submit " value ="Crash ">
14+ </ form >
15+ </ div >
16+ </ body >
17+ </ html >
Original file line number Diff line number Diff line change 1+ angular . module ( 'demoApp' , [ ] )
2+ . controller ( 'DemoController' , function ( ) {
3+ var demo = this ;
4+ demo . customText = '' ;
5+
6+ demo . triggerCrash = function ( ) {
7+ console . log ( 'crash' , demo . customText ) ;
8+ } ;
9+ } ) ;
You can’t perform that action at this time.
0 commit comments