On components and views, you run:
function () {
...
}.on('didInsertElement')
In other places, you can schedule a function to be called by the Ember Run loop:
Ember.run.scheduleOnce('afterRender', this, function() {
| // Requires export of Express app object: | |
| // var app = module.exports = express(); | |
| var app = require('app'); | |
| var templateToModule = function(template) { | |
| this.template = template; | |
| } | |
| templateToModule.prototype.render = function(callback) { | |
| app.render(this.template, function(error, html) { |
| Command: "D:\home\site\deployments\tools\deploy.cmd" | |
| Handling node.js deployment. | |
| KuduSync.NET from: 'D:\home\site\repository' to: 'D:\home\site\wwwroot' | |
| Deleting file: 'hostingstart.html' | |
| Copying file: '.gitignore' | |
| Copying file: 'azuredeploy.json' | |
| Copying file: 'bower.json' | |
| Copying file: 'config.example.js' | |
| Copying file: 'config.js' | |
| Copying file: 'Gruntfile.js' |
On components and views, you run:
function () {
...
}.on('didInsertElement')
In other places, you can schedule a function to be called by the Ember Run loop:
Ember.run.scheduleOnce('afterRender', this, function() {
| { | |
| "caret_extra_width": 1, | |
| "caret_style": "phase", | |
| "close_windows_when_empty": false, | |
| "color_scheme": "Packages/User/SublimeLinter/predawn (SL).tmTheme", | |
| "copy_with_empty_selection": false, | |
| "drag_text": false, | |
| "draw_minimap_border": true, | |
| "enable_tab_scrolling": false, | |
| "folder_exclude_patterns": |
| > [email protected] test-all:cover /home/feriese/Code-Native/ember-cli | |
| > istanbul cover tests/runner.js all | |
| info: Scanning for yuidoc.json file. | |
| warn: Skipping node_modules directory while scanning for yuidoc.json | |
| info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json | |
| info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json | |
| > [email protected] test-all:cover /home/feriese/Code-Native/ember-cli | |
| > istanbul cover tests/runner.js all | |
| info: Scanning for yuidoc.json file. | |
| warn: Skipping node_modules directory while scanning for yuidoc.json | |
| info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json | |
| info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json | |
| > [email protected] test-all:cover /home/feriese/Code-Native/ember-cli | |
| > istanbul cover tests/runner.js all | |
| info: Scanning for yuidoc.json file. | |
| warn: Skipping node_modules directory while scanning for yuidoc.json | |
| info: Loading package.json data from: /home/feriese/Code-Native/ember-cli/package.json | |
| info: Loading yuidoc.json data from: /home/feriese/Code-Native/ember-cli/docs/yuidoc.json | |
| feriese@FELIX-SURFACE ~/Code-Native/testapp (master) $ ember serve | |
| Could not start watchman; falling back to NodeWatcher for file system events. | |
| Visit http://ember-cli.com/user-guide/#watchman for more info. | |
| Just getting started with Ember? Please visit http://localhost:4200/ember-getting-started to get going | |
| File: /home/feriese/Code-Native/testapp/app | |
| The Broccoli Plugin: [object Object] failed with: | |
| Error: watch /home/feriese/Code-Native/testapp/app EPERM | |
| at exports._errnoException (util.js:1007:11) |
| Livereload server on http://localhost:49152 | |
| Serving on http://localhost:4200/ | |
| connect EPERM /usr/local/var/run/watchman/root-state/sock | |
| Error: connect EPERM /usr/local/var/run/watchman/root-state/sock | |
| at Object.exports._errnoException (util.js:1007:11) | |
| at exports._exceptionWithHostPort (util.js:1030:20) | |
| at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1080:14) | |
| The Broccoli Plugin: [ConfigReplace] failed with: | |
| Error: EISDIR: illegal operation on a directory, read | |
| at Error (native) |
| feriese@FELIX-SURFACE ~/Code-Native/testapp (master) $ sudo ember serve --watcher=polling | |
| Just getting started with Ember? Please visit http://localhost:4200/ember-getting-started to get going | |
| Livereload server on http://localhost:49152 | |
| Serving on http://localhost:4200/ | |
| The Broccoli Plugin: [ConfigReplace] failed with: | |
| Error: EISDIR: illegal operation on a directory, read | |
| at Error (native) | |
| at Object.fs.readSync (fs.js:725:19) |