fist things first
- this is dope
- this is dope too
const damn: string = 'daaaaamn';| %YAML 1.2 | |
| --- | |
| # http://www.sublimetext.com/docs/3/syntax.html | |
| name: Angular 2 | |
| file_extensions: | |
| - ts | |
| scope: source.ts | |
| contexts: | |
| main: | |
| - include: expression |
| import * as _ from 'lodash'; | |
| import {Config} from '../interfaces'; | |
| const ENV: string = process.env.NODE_ENV = process.env.NODE_ENV || 'dev'; | |
| let mainConfig: Config = { | |
| }; | |
| export const config: Config = _.merge(mainConfig, require(`./${ENV}`).default); // what ever file is required here does not get bundled |
| * { | |
| box-sizing: border-box; | |
| font-family: 'Raleway', sans-serif; | |
| } | |
| form { | |
| background-color: white; | |
| padding: 20px; | |
| border-radius: 3px; | |
| margin-bottom: 20px; | |
| } |
| # Set architecture flags | |
| export ARCHFLAGS="-arch x86_64" | |
| # Ensure user-installed binaries take precedence | |
| PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin | |
| # Setting PATH for Python 2.7 | |
| PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}" | |
| export PATH | |
| # Changing the colors so the terminal isn't so bland |
| { | |
| "name": "fem-ng2-simple-app", | |
| "version": "0.0.1", | |
| "license": "SEE LICENSE IN LICENSE", | |
| "repository": { | |
| "type": "git", | |
| "url": "https://github.com/onehungrymind/fem-ng2-simple-app/" | |
| }, | |
| "scripts": { | |
| "start": "webpack-dev-server --inline --watch", |
fist things first
const damn: string = 'daaaaamn';| angular.moudle('app', []) | |
| .config($stateProvider => { | |
| $stateProvider | |
| .state('profile', { | |
| url: '/profile', | |
| template: '<profile-page profile="profile"></profile-page>', | |
| controller(profile, $scope){ // use 'function' if minifying | |
| $scope.profile = profile; | |
| }, | |
| resolve: { |
| angular.module('app', []) | |
| .controller('AppController', function($scope, Todos, Reddit) { | |
| Reddit.getFrontPage() | |
| .then(function(posts) { | |
| $scope.redditPost = posts; | |
| }) | |
| $scope.newTodo = ''; | |
| $scope.todos = Todos.getState(); | |
| $scope.createTodo = function() { |
| angular.module('app', ['ui.router']) | |
| .config(function($stateProvider){ | |
| $stateProvider | |
| .state('app', { | |
| url: '/app', | |
| resolve: { | |
| // DataService must be a valid dependecny somewhere | |
| // user any valid service | |
| // data will be the name of the resolved value | |
| data: function(DataService /*, $http, $log, */){ |
| import angular from 'angular'; | |
| import _ from 'lodash'; | |
| let template = ` | |
| <div> | |
| <h1>{{ data.title }}</h1> | |
| <div ng-transclude></div> | |
| </div> | |
| `; |