Friday, October 16, 2015
ANGULAR - left menu, multiple controllers
https://www.codecademy.com/courses/javascript-advanced-en-2hJ3J/1/1#
index.html
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
<script src="app.js"></script>
<script src="user.js"></script>
<script src="menu.js"></script>
<script src="content.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body ng-app="exampleApp">
<header ng-controller="userCtrl">Welcome {{user}}!</header>
<nav ng-controller="menuCtrl">
<h2>Menu</h2>
<ul>
<li ng-repeat="link in links">{{link}}</li>
</ul>
</nav>
<article ng-controller="contentCtrl">
<h1>{{title}}</h1>
<hr />
<p>{{paragraph}}</p>
<small >by {{author}}</small>
</article>
</body>
</html>
app.js
// Defining a module
angular.module('exampleApp', []);
user.js
angular.module('exampleApp')
.controller('userCtrl', function ($scope) {
$scope.user = "Jan Kowalski";
});
menu.js
angular.module('exampleApp')
.controller('menuCtrl', function ($scope) {
$scope.links = ['Link 1', 'Link 2'];
});
content.js
angular.module('exampleApp')
.controller('contentCtrl', function ($scope) {
$scope.title = "Lorem Ipsum";
$scope.paragraph = "Completely myocardinate process-centric "
+ "total linkage whereas installed base e-tailers. "
+ "Proactively extend collaborative intellectual capital "
+ "vis-a-vis unique expertise. Dynamically.";
$scope.author = "Anna Nowak";
});
style.css
body {
width: 500px;
}
nav {
float: left;
width: 30%;
}
article {
margin-left: 30%;
width: 70%;
}
index.html
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.16/angular.js"></script>
<script src="app.js"></script>
<script src="user.js"></script>
<script src="menu.js"></script>
<script src="content.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body ng-app="exampleApp">
<header ng-controller="userCtrl">Welcome {{user}}!</header>
<nav ng-controller="menuCtrl">
<h2>Menu</h2>
<ul>
<li ng-repeat="link in links">{{link}}</li>
</ul>
</nav>
<article ng-controller="contentCtrl">
<h1>{{title}}</h1>
<hr />
<p>{{paragraph}}</p>
<small >by {{author}}</small>
</article>
</body>
</html>
app.js
// Defining a module
angular.module('exampleApp', []);
user.js
angular.module('exampleApp')
.controller('userCtrl', function ($scope) {
$scope.user = "Jan Kowalski";
});
menu.js
angular.module('exampleApp')
.controller('menuCtrl', function ($scope) {
$scope.links = ['Link 1', 'Link 2'];
});
content.js
angular.module('exampleApp')
.controller('contentCtrl', function ($scope) {
$scope.title = "Lorem Ipsum";
$scope.paragraph = "Completely myocardinate process-centric "
+ "total linkage whereas installed base e-tailers. "
+ "Proactively extend collaborative intellectual capital "
+ "vis-a-vis unique expertise. Dynamically.";
$scope.author = "Anna Nowak";
});
style.css
body {
width: 500px;
}
nav {
float: left;
width: 30%;
}
article {
margin-left: 30%;
width: 70%;
}
Thursday, October 15, 2015
ANGULAR - links on different components implementaiotion
Angular Dropdown menu:
https://www.codementor.io/angularjs/tutorial/create-dropdown-control
https://angular-ui.github.io/bootstrap/
https://github.com/jseppi/angular-dropdowns (https://jsfiddle.net/jseppi/cTzun/142/embedded/result/)
Angular Left menu:
http://stackoverflow.com/questions/18599753/vertical-navbar-using-bootstrap-and-angular (http://plnkr.co/edit/UBBq7V8mdyqllBHdwegY?p=preview)
Angular Subheader
http://codepen.io/svswaminathan/pen/MYBrgM
https://www.codementor.io/angularjs/tutorial/create-dropdown-control
https://angular-ui.github.io/bootstrap/
https://github.com/jseppi/angular-dropdowns (https://jsfiddle.net/jseppi/cTzun/142/embedded/result/)
Angular Left menu:
http://stackoverflow.com/questions/18599753/vertical-navbar-using-bootstrap-and-angular (http://plnkr.co/edit/UBBq7V8mdyqllBHdwegY?p=preview)
Angular Subheader
http://codepen.io/svswaminathan/pen/MYBrgM
Tuesday, October 13, 2015
Tuesday, October 6, 2015
Saturday, October 3, 2015
ANDROID - how to enable your mobile phone for Android Studio on Windows
Case:
You want to run/debug Android app on your phone (e.g. Samsung Galaxy S2) instead of emulator (which sucks), but Android Studio (Windows version of it) can not see it among available devices.
Solution:
FIRST OF ALL The last thing you will think it is important, but it is indeed: install on Windows USB drivers for you phone model!!!
For instance:
Samsung Galaxy S2: http://www.samsung.com/us/support/owners/product/SGH-I777ZKAATT
LG L9: http://www.lg.com/us/support-mobile/lg-LGP769BK
Then enable some phone settings:
Developer options / USB debugging
Security / Unknown sources (Allow installation of apps from sources other than Play Store)
You want to run/debug Android app on your phone (e.g. Samsung Galaxy S2) instead of emulator (which sucks), but Android Studio (Windows version of it) can not see it among available devices.
Solution:
FIRST OF ALL The last thing you will think it is important, but it is indeed: install on Windows USB drivers for you phone model!!!
For instance:
Samsung Galaxy S2: http://www.samsung.com/us/support/owners/product/SGH-I777ZKAATT
LG L9: http://www.lg.com/us/support-mobile/lg-LGP769BK
Then enable some phone settings:
Developer options / USB debugging
Security / Unknown sources (Allow installation of apps from sources other than Play Store)
Friday, October 2, 2015
Subscribe to:
Posts (Atom)