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
| <div ng-controller="EditController"> | |
| <span>{{message}}</span> | |
| <div ng-if="userIsAdmin"> | |
| <span>Edit Message</span> | |
| <input ng-model="message"/> | |
| </div> | |
| </div> |
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
| <div ng-controller="EditController"> | |
| <span>{{message}}</span> | |
| <div ng-if="userIsAdmin"> | |
| <span>Edit Message</span> | |
| <input ng-model="$parent.message"/> | |
| </div> | |
| </div> |
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
| app.controller('SimpleController', function($scope) { | |
| $scope.message = 'Hello Angular!'; | |
| }); |
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
| app.controller('HelloController', function($scope) { | |
| $scope.message = 'Hello World!'; | |
| }); | |
| app.controller('GoodbyeController', function($scope) { | |
| $scope.message = 'Goodbye World!'; | |
| }); |
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
| app.controller('OuterController', function($scope) { | |
| $scope.outer = 'From the outside'; | |
| }); | |
| app.controller('InnerController', function($scope) { | |
| $scope.inner = 'looking in.'; | |
| }); |
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
| <div ng-controller="EditController"> | |
| <span>{{message.content}}</span> | |
| <div ng-if="userIsAdmin"> | |
| <span>Edit Message</span> | |
| <input ng-model="message.content"/> | |
| </div> | |
| </div> |
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
| app.directive('isolated', function() { | |
| return { | |
| scope: {}, | |
| template: '<input ng-model="message.content"><span>{{message.content}}</span>' | |
| }; | |
| }); |
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
| app.directive('isolated', function() { | |
| return { | |
| scope: { | |
| message: '=' | |
| }, | |
| template: '<input ng-model="message.content"><span>{{message.content}}</span>' | |
| }; | |
| }); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head><title>getUserMedia</title></head> | |
| <body> | |
| <video autoplay></video> | |
| <script> | |
| navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia; | |
| var constraints = { audio: false, video: true }; |
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
| class PusherController < ApplicationController | |
| protect_from_forgery except: :auth | |
| def auth | |
| response = Pusher[params[:channel_name]].authenticate params[:socket_id], | |
| user_id: params[:id], | |
| user_info: { name: params[:name] } | |
| render json: response | |
| end |
OlderNewer