These are chat archives for AngularClass/NG6-starter

27th
Dec 2015
adi carmel
@adica
Dec 27 2015 20:13
Any working example with bootstrap or material-design?
Sergey Protko
@fesor
Dec 27 2015 20:15
import uiRouter from 'angular-ui-router';
import bootstrap from 'angular-ui-bootstrap';

angular.module('app', [
  uiRouter, bootstrap
])
and in my app.less
@import '~bootstrap/less/bootstrap’;
very simple webpack config
module.exports = {
  devtool: 'sourcemap',
  output: {
    filename: 'bundle.js'
  },
  module: {
    loaders: [
       { test: /\.js$/, exclude: [/app\/lib/, /node_modules/], loader: 'babel' },
       { test: /\.(png)$/, loader: 'url-loader?limit=100000' },
       { test: /\.woff(2)?(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/font-woff" },
       { test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=application/octet-stream" },
       { test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" },
       { test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&mimetype=image/svg+xml" },
       { test: /\.jade$/, loader: "jade" },
       { test: /\.html$/, loader: 'raw' },
       { test: /\.less$/, loader: 'style!css!less' },
       { test: /\.css$/,  loader: 'style!css' }
    ]
  }
};
it will handle fonts from bootstrap correctly
also consider to use webpack extract text plugin to server css independently
p.s.we planning to use AngularClass/NG6-starter#75 angular material 1.0. And we are welcome for PRs :)
adi carmel
@adica
Dec 27 2015 20:29
@fesor tnx! i will check it soon.
Joe Gatt
@joegatt
Dec 27 2015 22:54
Some time back, @FredericLatour had mentioned he was unable to get uiRouter's resolve to pass values to controllers. I'm failing at the same thing. Is it possible to do this?
Sergey Protko
@fesor
Dec 27 2015 22:54
to controller’s of directives?
you must pass resolved values via attributes. Something like this:
.state(‘home’, {
    resolve: {
        data: ($stateParams, homeDataReducer) => homeDataReducer($stateParams.someParam)
    },
    controller: ($scope, data) => {
         $scope.data = data;
    },
    template: `
        <my-home my-data=“data”></my-home>
    `
}
something like that
Sergey Protko
@fesor
Dec 27 2015 23:00
maybe someone can suggest a more clean solution