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 modelString = device.model; | |
| var modelRegex = /\d+/g; | |
| var isIPhone6PlusOrHigher = false; | |
| var match = modelString.match(modelRegex); | |
| if (match != null) { | |
| var major = match[0], minor = match[1]; | |
| if (major == 7) { | |
| if (minor != 2) { | |
| // iphone 6 plus | |
| isIPhone6PlusOrHigher = 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
| var Person = function (name) { | |
| this.name = name; | |
| } | |
| Person.prototype = { | |
| sayHi: function() { | |
| console.log('Hi, my name is ' + this.name); | |
| }, | |
| parentClassMethod: function() { | |
| console.log('Method from Person class called on ' + this.name); |
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
| (function() { | |
| 'use strict'; | |
| angular.module('App').controller('Ctrl', Ctrl); | |
| Ctrl.$inject = []; | |
| function Ctrl() { | |
| var vm = this; | |
| } | |
| })(); |
NewerOlder